Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
mpc52xx_common.c File Reference
#include <linux/gpio.h>
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/of_platform.h>
#include <linux/of_gpio.h>
#include <linux/export.h>
#include <asm/io.h>
#include <asm/prom.h>
#include <asm/mpc52xx.h>

Go to the source code of this file.

Macros

#define PSC1_RESET   0x1
 
#define PSC1_SYNC   0x4
 
#define PSC1_SDATA_OUT   0x1
 
#define PSC2_RESET   0x2
 
#define PSC2_SYNC   (0x4<<4)
 
#define PSC2_SDATA_OUT   (0x1<<4)
 
#define MPC52xx_GPIO_PSC1_MASK   0x7
 
#define MPC52xx_GPIO_PSC2_MASK   (0x7<<4)
 

Functions

void __init mpc5200_setup_xlb_arbiter (void)
 
void __init mpc52xx_declare_of_platform_devices (void)
 
void __init mpc52xx_map_common_devices (void)
 
int mpc52xx_set_psc_clkdiv (int psc_id, int clkdiv)
 
 EXPORT_SYMBOL (mpc52xx_set_psc_clkdiv)
 
unsigned int mpc52xx_get_xtal_freq (struct device_node *node)
 
 EXPORT_SYMBOL (mpc52xx_get_xtal_freq)
 
void mpc52xx_restart (char *cmd)
 
int mpc5200_psc_ac97_gpio_reset (int psc_number)
 
 EXPORT_SYMBOL (mpc5200_psc_ac97_gpio_reset)
 

Variables

struct mpc52xx_gpio __iomemsimple_gpio
 
struct mpc52xx_gpio_wkup __iomemwkup_gpio
 

Macro Definition Documentation

#define MPC52xx_GPIO_PSC1_MASK   0x7

Definition at line 271 of file mpc52xx_common.c.

#define MPC52xx_GPIO_PSC2_MASK   (0x7<<4)

Definition at line 272 of file mpc52xx_common.c.

#define PSC1_RESET   0x1

Definition at line 265 of file mpc52xx_common.c.

#define PSC1_SDATA_OUT   0x1

Definition at line 267 of file mpc52xx_common.c.

#define PSC1_SYNC   0x4

Definition at line 266 of file mpc52xx_common.c.

#define PSC2_RESET   0x2

Definition at line 268 of file mpc52xx_common.c.

#define PSC2_SDATA_OUT   (0x1<<4)

Definition at line 270 of file mpc52xx_common.c.

#define PSC2_SYNC   (0x4<<4)

Definition at line 269 of file mpc52xx_common.c.

Function Documentation

EXPORT_SYMBOL ( mpc52xx_set_psc_clkdiv  )
EXPORT_SYMBOL ( mpc52xx_get_xtal_freq  )
EXPORT_SYMBOL ( mpc5200_psc_ac97_gpio_reset  )
int mpc5200_psc_ac97_gpio_reset ( int  psc_number)

mpc5200_psc_ac97_gpio_reset: Use gpio pins to reset the ac97 bus

: psc number to reset (only psc 1 and 2 support ac97)

Definition at line 279 of file mpc52xx_common.c.

void __init mpc5200_setup_xlb_arbiter ( void  )

Definition at line 57 of file mpc52xx_common.c.

void __init mpc52xx_declare_of_platform_devices ( void  )

mpc52xx_declare_of_platform_devices: register internal devices and children of the localplus bus to the of_platform bus.

Definition at line 101 of file mpc52xx_common.c.

unsigned int mpc52xx_get_xtal_freq ( struct device_node node)

mpc52xx_get_xtal_freq - Get SYS_XTAL_IN frequency for a device

: device node

Returns the frequency of the external oscillator clock connected to the SYS_XTAL_IN pin, or 0 if it cannot be determined.

Definition at line 214 of file mpc52xx_common.c.

void __init mpc52xx_map_common_devices ( void  )

mpc52xx_map_common_devices: iomap devices required by common code

Definition at line 135 of file mpc52xx_common.c.

void mpc52xx_restart ( char cmd)

mpc52xx_restart: ppc_md->restart hook for mpc5200 using the watchdog timer

Definition at line 247 of file mpc52xx_common.c.

int mpc52xx_set_psc_clkdiv ( int  psc_id,
int  clkdiv 
)

mpc52xx_set_psc_clkdiv: Set clock divider in the CDM for PSC ports

: id of psc port; must be 1,2,3 or 6 : clock divider value to put into CDM PSC register.

Definition at line 174 of file mpc52xx_common.c.

Variable Documentation

struct mpc52xx_gpio __iomem* simple_gpio

Definition at line 93 of file mpc52xx_common.c.

Definition at line 94 of file mpc52xx_common.c.