diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2012-10-08 07:44:06 (GMT) |
---|---|---|
committer | Andy Fleming <afleming@freescale.com> | 2012-10-22 19:31:14 (GMT) |
commit | 800c73c410732e1c9f852a935151c834f3b31c4d (patch) | |
tree | 86af9dc5af2c5bfa8471a4f096ef10e262397503 /arch | |
parent | 553ae6f8f2d860fb6a694fc3316bf80ba35ee794 (diff) | |
download | u-boot-800c73c410732e1c9f852a935151c834f3b31c4d.tar.xz |
powerpc/85xx: Add determining and report IFC frequency
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/cpu.c | 4 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/speed.c | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index a5048a1..26fc84c 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -181,6 +181,10 @@ int checkcpu (void) } #endif +#if defined(CONFIG_FSL_IFC) + printf("IFC:%-4s MHz\n", strmhz(buf1, sysinfo.freqLocalBus)); +#endif + #ifdef CONFIG_CPM2 printf("CPM: %s MHz\n", strmhz(buf1, sysinfo.freqSystemBus)); #endif diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c index 6dd9e8d..203f53d 100644 --- a/arch/powerpc/cpu/mpc85xx/speed.c +++ b/arch/powerpc/cpu/mpc85xx/speed.c @@ -39,6 +39,10 @@ DECLARE_GLOBAL_DATA_PTR; void get_sys_info (sys_info_t * sysInfo) { volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); +#ifdef CONFIG_FSL_IFC + struct fsl_ifc *ifc_regs = (void *)CONFIG_SYS_IFC_ADDR; + u32 ccr; +#endif #ifdef CONFIG_FSL_CORENET volatile ccsr_clk_t *clk = (void *)(CONFIG_SYS_FSL_CORENET_CLK_ADDR); unsigned int cpu; @@ -230,6 +234,13 @@ void get_sys_info (sys_info_t * sysInfo) sysInfo->freqLocalBus = lcrr_div; } #endif + +#if defined(CONFIG_FSL_IFC) + ccr = in_be32(&ifc_regs->ifc_ccr); + ccr = ((ccr & IFC_CCR_CLK_DIV_MASK) >> IFC_CCR_CLK_DIV_SHIFT) + 1; + + sysInfo->freqLocalBus = sysInfo->freqSystemBus / ccr; +#endif } |