Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
m532x.c File Reference
#include <linux/kernel.h>
#include <linux/param.h>
#include <linux/init.h>
#include <linux/io.h>
#include <asm/machdep.h>
#include <asm/coldfire.h>
#include <asm/mcfsim.h>
#include <asm/mcfuart.h>
#include <asm/mcfdma.h>
#include <asm/mcfwdebug.h>
#include <asm/mcfclk.h>

Go to the source code of this file.

Macros

#define MAX_FVCO   500000 /* KHz */
 
#define MAX_FSYS   80000 /* KHz */
 
#define MIN_FSYS   58333 /* KHz */
 
#define FREF   16000 /* KHz */
 
#define MAX_MFD   135 /* Multiplier */
 
#define MIN_MFD   88 /* Multiplier */
 
#define BUSDIV   6 /* Divider */
 
#define MIN_LPD   (1 << 0) /* Divider (not encoded) */
 
#define MAX_LPD   (1 << 15) /* Divider (not encoded) */
 
#define DEFAULT_LPD   (1 << 1) /* Divider (not encoded) */
 
#define SYS_CLK_KHZ   80000
 
#define SYSTEM_PERIOD   12.5
 
#define SDRAM_BL   8 /* # of beats in a burst */
 
#define SDRAM_TWR   2 /* in clocks */
 
#define SDRAM_CASL   2.5 /* CASL in clocks */
 
#define SDRAM_TRCD   2 /* in clocks */
 
#define SDRAM_TRP   2 /* in clocks */
 
#define SDRAM_TRFC   7 /* in clocks */
 
#define SDRAM_TREFI   7800 /* in ns */
 
#define EXT_SRAM_ADDRESS   (0xC0000000)
 
#define FLASH_ADDRESS   (0x00000000)
 
#define SDRAM_ADDRESS   (0x40000000)
 
#define NAND_FLASH_ADDRESS   (0xD0000000)
 
#define MCF_SCM_BCR_GBW   (0x00000100)
 
#define MCF_SCM_BCR_GBR   (0x00000200)
 

Functions

 DEFINE_CLK (0,"flexbus", 2, MCF_CLK)
 
 DEFINE_CLK (0,"mcfcan.0", 8, MCF_CLK)
 
 DEFINE_CLK (0,"fec.0", 12, MCF_CLK)
 
 DEFINE_CLK (0,"edma", 17, MCF_CLK)
 
 DEFINE_CLK (0,"intc.0", 18, MCF_CLK)
 
 DEFINE_CLK (0,"intc.1", 19, MCF_CLK)
 
 DEFINE_CLK (0,"iack.0", 21, MCF_CLK)
 
 DEFINE_CLK (0,"mcfi2c.0", 22, MCF_CLK)
 
 DEFINE_CLK (0,"mcfqspi.0", 23, MCF_CLK)
 
 DEFINE_CLK (0,"mcfuart.0", 24, MCF_BUSCLK)
 
 DEFINE_CLK (0,"mcfuart.1", 25, MCF_BUSCLK)
 
 DEFINE_CLK (0,"mcfuart.2", 26, MCF_BUSCLK)
 
 DEFINE_CLK (0,"mcftmr.0", 28, MCF_CLK)
 
 DEFINE_CLK (0,"mcftmr.1", 29, MCF_CLK)
 
 DEFINE_CLK (0,"mcftmr.2", 30, MCF_CLK)
 
 DEFINE_CLK (0,"mcftmr.3", 31, MCF_CLK)
 
 DEFINE_CLK (0,"mcfpit.0", 32, MCF_CLK)
 
 DEFINE_CLK (0,"mcfpit.1", 33, MCF_CLK)
 
 DEFINE_CLK (0,"mcfpit.2", 34, MCF_CLK)
 
 DEFINE_CLK (0,"mcfpit.3", 35, MCF_CLK)
 
 DEFINE_CLK (0,"mcfpwm.0", 36, MCF_CLK)
 
 DEFINE_CLK (0,"mcfeport.0", 37, MCF_CLK)
 
 DEFINE_CLK (0,"mcfwdt.0", 38, MCF_CLK)
 
 DEFINE_CLK (0,"sys.0", 40, MCF_BUSCLK)
 
 DEFINE_CLK (0,"gpio.0", 41, MCF_BUSCLK)
 
 DEFINE_CLK (0,"mcfrtc.0", 42, MCF_CLK)
 
 DEFINE_CLK (0,"mcflcd.0", 43, MCF_CLK)
 
 DEFINE_CLK (0,"mcfusb-otg.0", 44, MCF_CLK)
 
 DEFINE_CLK (0,"mcfusb-host.0", 45, MCF_CLK)
 
 DEFINE_CLK (0,"sdram.0", 46, MCF_CLK)
 
 DEFINE_CLK (0,"ssi.0", 47, MCF_CLK)
 
 DEFINE_CLK (0,"pll.0", 48, MCF_CLK)
 
 DEFINE_CLK (1,"mdha.0", 32, MCF_CLK)
 
 DEFINE_CLK (1,"skha.0", 33, MCF_CLK)
 
 DEFINE_CLK (1,"rng.0", 34, MCF_CLK)
 
void __init config_BSP (char *commandp, int size)
 
void wtm_init (void)
 
void scm_init (void)
 
void gpio_init (void)
 
void fbcs_init (void)
 
void sdramc_init (void)
 
int clock_pll (int fsys, int flags)
 
int clock_limp (int)
 
int clock_exit_limp (void)
 
int get_sys_clock (void)
 
asmlinkage void __init sysinit (void)
 

Variables

struct clkmcf_clks []
 
int sys_clk_khz = 0
 
int sys_clk_mhz = 0
 

Macro Definition Documentation

#define BUSDIV   6 /* Divider */

Definition at line 251 of file m532x.c.

#define DEFAULT_LPD   (1 << 1) /* Divider (not encoded) */

Definition at line 258 of file m532x.c.

#define EXT_SRAM_ADDRESS   (0xC0000000)

Definition at line 273 of file m532x.c.

#define FLASH_ADDRESS   (0x00000000)

Definition at line 274 of file m532x.c.

#define FREF   16000 /* KHz */

Definition at line 246 of file m532x.c.

#define MAX_FSYS   80000 /* KHz */

Definition at line 244 of file m532x.c.

#define MAX_FVCO   500000 /* KHz */

Definition at line 243 of file m532x.c.

#define MAX_LPD   (1 << 15) /* Divider (not encoded) */

Definition at line 257 of file m532x.c.

#define MAX_MFD   135 /* Multiplier */

Definition at line 249 of file m532x.c.

#define MCF_SCM_BCR_GBR   (0x00000200)

Definition at line 311 of file m532x.c.

#define MCF_SCM_BCR_GBW   (0x00000100)

Definition at line 310 of file m532x.c.

#define MIN_FSYS   58333 /* KHz */

Definition at line 245 of file m532x.c.

#define MIN_LPD   (1 << 0) /* Divider (not encoded) */

Definition at line 256 of file m532x.c.

#define MIN_MFD   88 /* Multiplier */

Definition at line 250 of file m532x.c.

#define NAND_FLASH_ADDRESS   (0xD0000000)

Definition at line 277 of file m532x.c.

#define SDRAM_ADDRESS   (0x40000000)

Definition at line 275 of file m532x.c.

#define SDRAM_BL   8 /* # of beats in a burst */

Definition at line 265 of file m532x.c.

#define SDRAM_CASL   2.5 /* CASL in clocks */

Definition at line 267 of file m532x.c.

#define SDRAM_TRCD   2 /* in clocks */

Definition at line 268 of file m532x.c.

#define SDRAM_TREFI   7800 /* in ns */

Definition at line 271 of file m532x.c.

#define SDRAM_TRFC   7 /* in clocks */

Definition at line 270 of file m532x.c.

#define SDRAM_TRP   2 /* in clocks */

Definition at line 269 of file m532x.c.

#define SDRAM_TWR   2 /* in clocks */

Definition at line 266 of file m532x.c.

#define SYS_CLK_KHZ   80000

Definition at line 260 of file m532x.c.

#define SYSTEM_PERIOD   12.5

Definition at line 261 of file m532x.c.

Function Documentation

int clock_exit_limp ( void  )

Definition at line 566 of file m532x.c.

int clock_limp ( int  div)

Definition at line 544 of file m532x.c.

int clock_pll ( int  fsys,
int  flags 
)

Definition at line 469 of file m532x.c.

void __init config_BSP ( char commandp,
int  size 
)

Definition at line 207 of file m532x.c.

DEFINE_CLK ( ,
"flexbus"  ,
,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfcan.0"  ,
,
MCF_CLK   
)
DEFINE_CLK ( ,
"fec.0"  ,
12  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"edma"  ,
17  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"intc.0"  ,
18  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"intc.1"  ,
19  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"iack.0"  ,
21  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfi2c.0"  ,
22  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfqspi.0"  ,
23  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfuart.0"  ,
24  ,
MCF_BUSCLK   
)
DEFINE_CLK ( ,
"mcfuart.1"  ,
25  ,
MCF_BUSCLK   
)
DEFINE_CLK ( ,
"mcfuart.2"  ,
26  ,
MCF_BUSCLK   
)
DEFINE_CLK ( ,
"mcftmr.0"  ,
28  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcftmr.1"  ,
29  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcftmr.2"  ,
30  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcftmr.3"  ,
31  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfpit.0"  ,
32  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfpit.1"  ,
33  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfpit.2"  ,
34  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfpit.3"  ,
35  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfpwm.0"  ,
36  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfeport.0"  ,
37  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfwdt.0"  ,
38  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"sys.0"  ,
40  ,
MCF_BUSCLK   
)
DEFINE_CLK ( ,
"gpio.0"  ,
41  ,
MCF_BUSCLK   
)
DEFINE_CLK ( ,
"mcfrtc.0"  ,
42  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcflcd.0"  ,
43  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfusb-otg.0"  ,
44  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mcfusb-host.0"  ,
45  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"sdram.0"  ,
46  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"ssi.0"  ,
47  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"pll.0"  ,
48  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"mdha.0"  ,
32  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"skha.0"  ,
33  ,
MCF_CLK   
)
DEFINE_CLK ( ,
"rng.0"  ,
34  ,
MCF_CLK   
)
void fbcs_init ( void  )

Definition at line 332 of file m532x.c.

int get_sys_clock ( void  )

Definition at line 582 of file m532x.c.

void gpio_init ( void  )

Definition at line 454 of file m532x.c.

void scm_init ( void  )

Definition at line 313 of file m532x.c.

void sdramc_init ( void  )

Definition at line 365 of file m532x.c.

asmlinkage void __init sysinit ( void  )

Definition at line 292 of file m532x.c.

void wtm_init ( void  )

Definition at line 304 of file m532x.c.

Variable Documentation

struct clk* mcf_clks[]

Definition at line 72 of file m532x.c.

int sys_clk_khz = 0

Definition at line 279 of file m532x.c.

int sys_clk_mhz = 0

Definition at line 280 of file m532x.c.