summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpu/ppc4xx/speed.c96
-rw-r--r--include/configs/acadia.h3
2 files changed, 22 insertions, 77 deletions
diff --git a/cpu/ppc4xx/speed.c b/cpu/ppc4xx/speed.c
index 1f75137..988ba97 100644
--- a/cpu/ppc4xx/speed.c
+++ b/cpu/ppc4xx/speed.c
@@ -165,30 +165,13 @@ void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
}
}
+ sysInfo->freqOPB = sysInfo->freqPLB / sysInfo->pllOpbDiv;
sysInfo->freqEBC = sysInfo->freqPLB / sysInfo->pllExtBusDiv;
-
sysInfo->freqUART = sysInfo->freqProcessor;
}
/********************************************
- * get_OPB_freq
- * return OPB bus freq in Hz
- *********************************************/
-ulong get_OPB_freq (void)
-{
- ulong val = 0;
-
- PPC4xx_SYS_INFO sys_info;
-
- get_sys_info (&sys_info);
- val = sys_info.freqPLB / sys_info.pllOpbDiv;
-
- return val;
-}
-
-
-/********************************************
* get_PCI_freq
* return PCI bus freq in Hz
*********************************************/
@@ -752,14 +735,6 @@ unsigned long determine_pci_clock_per(void)
}
#endif
-ulong get_OPB_freq (void)
-{
-
- sys_info_t sys_info;
- get_sys_info (&sys_info);
- return sys_info.freqOPB;
-}
-
#elif defined(CONFIG_XILINX_405)
extern void get_sys_info (sys_info_t * sysInfo);
extern ulong get_PCI_freq (void);
@@ -875,23 +850,6 @@ void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
/********************************************
- * get_OPB_freq
- * return OPB bus freq in Hz
- *********************************************/
-ulong get_OPB_freq (void)
-{
- ulong val = 0;
-
- PPC4xx_SYS_INFO sys_info;
-
- get_sys_info (&sys_info);
- val = sys_info.freqPLB / sys_info.pllOpbDiv;
-
- return val;
-}
-
-
-/********************************************
* get_PCI_freq
* return PCI bus freq in Hz
*********************************************/
@@ -914,6 +872,7 @@ void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
unsigned long sysClkPeriodPs = ONE_BILLION / (CONFIG_SYS_CLK_FREQ/1000);
unsigned long primad_cpudv;
unsigned long m;
+ unsigned long plloutb;
/*
* Read PLL Mode registers
@@ -996,26 +955,16 @@ void get_sys_info (PPC4xx_SYS_INFO * sysInfo)
sysInfo->freqPLB = (CONFIG_SYS_CLK_FREQ * m) /
sysInfo->pllFwdDiv / sysInfo->pllPlbDiv;
+ sysInfo->freqOPB = (CONFIG_SYS_CLK_FREQ * sysInfo->pllFbkDiv) /
+ sysInfo->pllOpbDiv;
+
sysInfo->freqEBC = (CONFIG_SYS_CLK_FREQ * sysInfo->pllFbkDiv) /
sysInfo->pllExtBusDiv;
- sysInfo->freqUART = sysInfo->freqVCOHz;
-}
-
-/********************************************
- * get_OPB_freq
- * return OPB bus freq in Hz
- *********************************************/
-ulong get_OPB_freq (void)
-{
- ulong val = 0;
-
- PPC4xx_SYS_INFO sys_info;
-
- get_sys_info (&sys_info);
- val = (CONFIG_SYS_CLK_FREQ * sys_info.pllFbkDiv) / sys_info.pllOpbDiv;
-
- return val;
+ plloutb = ((CONFIG_SYS_CLK_FREQ * ((cpr_pllc & PLLC_SRC_MASK) ?
+ sysInfo->pllFwdDivB : sysInfo->pllFwdDiv) * sysInfo->pllFbkDiv) /
+ sysInfo->pllFwdDivB);
+ sysInfo->freqUART = plloutb;
}
#elif defined(CONFIG_405EX)
@@ -1164,22 +1113,6 @@ void get_sys_info (sys_info_t * sysInfo)
sysInfo->freqUART = sysInfo->freqPLB;
}
-/********************************************
- * get_OPB_freq
- * return OPB bus freq in Hz
- *********************************************/
-ulong get_OPB_freq (void)
-{
- ulong val = 0;
-
- PPC4xx_SYS_INFO sys_info;
-
- get_sys_info (&sys_info);
- val = sys_info.freqPLB / sys_info.pllOpbDiv;
-
- return val;
-}
-
#endif
int get_clocks (void)
@@ -1231,3 +1164,14 @@ ulong get_bus_freq (ulong dummy)
return val;
}
+
+#if !defined(CONFIG_IOP480)
+ulong get_OPB_freq (void)
+{
+ PPC4xx_SYS_INFO sys_info;
+
+ get_sys_info (&sys_info);
+
+ return sys_info.freqOPB;
+}
+#endif
diff --git a/include/configs/acadia.h b/include/configs/acadia.h
index b710107..2fb48b6 100644
--- a/include/configs/acadia.h
+++ b/include/configs/acadia.h
@@ -225,7 +225,8 @@
*/
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_AMCC_DEF_ENV \
- CONFIG_AMCC_DEF_ENV_PPC \
+ CONFIG_AMCC_DEF_ENV_POWERPC \
+ CONFIG_AMCC_DEF_ENV_PPC_OLD \
CONFIG_AMCC_DEF_ENV_NOR_UPD \
CONFIG_AMCC_DEF_ENV_NAND_UPD \
"kernel_addr=fff10000\0" \