summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx/speed.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-03-14 00:07:33 +0000
committerwdenk <wdenk>2004-03-14 00:07:33 +0000
commit0e6d798cb313580acd06ba01626687a557c5159f (patch)
treeb7b0a635d29fa573b0995c1c5eda0ba33d41810e /cpu/ppc4xx/speed.c
parentc40b29568232761e33400e58be86b15a167d3422 (diff)
* Patch by Travis Sawyer, 01 Mar 2004:
Ocotea: - Add IBM PPC440GX Ref Platform support (Ocotea) Original code by Paul Reynolds <PaulReynolds@lhsolutions.com> Adapted to U-Boot and 440GX port 440gx_enet.c: - Add gracious handling of all Ethernet Pin Selections for 440GX - Add RGMII selection for Cicada CIS8201 Gigabit PHY ppc440.h: - Add needed bit definitions - Fix formatting * Patch by Carl Riechers, 1 Mar 2004: Add PPC440GX prbdv0 divider to fix memory clock calculation. * Patch by Stephan Linz, 27 Feb 2004 - avoid problems for targets without NFS download support
Diffstat (limited to 'cpu/ppc4xx/speed.c')
-rw-r--r--cpu/ppc4xx/speed.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cpu/ppc4xx/speed.c b/cpu/ppc4xx/speed.c
index e776050bcc..7172fe3ea8 100644
--- a/cpu/ppc4xx/speed.c
+++ b/cpu/ppc4xx/speed.c
@@ -247,7 +247,7 @@ void get_sys_info (sys_info_t * sysInfo)
unsigned long temp1;
unsigned long lfdiv;
unsigned long m;
-
+ unsigned long prbdv0;
/* Extract configured divisors */
mfsdr( sdr_sdstp0,strp0 );
@@ -263,6 +263,7 @@ void get_sys_info (sys_info_t * sysInfo)
sysInfo->pllOpbDiv = temp ? temp : 4;
temp = (strp1 & PLLSYS1_PERCLK_DIV_MASK) >> 24;
sysInfo->pllExtBusDiv = temp ? temp : 4;
+ prbdv0 = (strp0 >> 2) & 0x7;
/* Calculate 'M' based on feedback source */
temp = (strp0 & PLLSYS0_SEL_MASK) >> 27;
@@ -284,7 +285,7 @@ void get_sys_info (sys_info_t * sysInfo)
/* Now calculate the individual clocks */
sysInfo->freqVCOMhz = (m * CONFIG_SYS_CLK_FREQ) + (m>>1);
sysInfo->freqProcessor = sysInfo->freqVCOMhz/sysInfo->pllFwdDivA;
- sysInfo->freqPLB = sysInfo->freqVCOMhz/sysInfo->pllFwdDivB;
+ sysInfo->freqPLB = sysInfo->freqVCOMhz/sysInfo->pllFwdDivB/prbdv0;
sysInfo->freqOPB = sysInfo->freqPLB/sysInfo->pllOpbDiv;
sysInfo->freqEPB = sysInfo->freqOPB/sysInfo->pllExtBusDiv;