[U-Boot-Users] Patch PPC440GX speed

This patch adds the PPC440GX prbdv0 divider to the memory clock equation. This is my first experience with u-boot, my thanks to Wolfgang, Travis, and everyone that has contributed. I saw my first u-boot prompt after adding this divider with the correct SDRAM settings.
Carl
--- ./u-boot-bl/cpu/ppc4xx/speed.c 2004-02-29 14:07:35.000000000 -0600 +++ ./u-boot/cpu/ppc4xx/speed.c 2004-02-29 14:13:04.000000000 -0600 @@ -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;
__________________________________ Do you Yahoo!? Get better spam protection with Yahoo! Mail. http://antispam.yahoo.com/tools

Dear Carl,
in message 20040229205421.64918.qmail@web60501.mail.yahoo.com you wrote:
This patch adds the PPC440GX prbdv0 divider to the memory clock equation. This is my first experience with u-boot, my thanks to Wolfgang, Travis, and everyone that has contributed. I saw my first u-boot prompt after adding this divider with the correct SDRAM settings.
Sorry, but your patch is not usable sind your mailer wrapped the lines and corrupted it.
Please re-send the patch uuencoded or as MIME attachment.
Best regards,
Wolfgang Denk

Attached patch file.
Carl
--- Wolfgang Denk wd@denx.de wrote:
Dear Carl,
in message 20040229205421.64918.qmail@web60501.mail.yahoo.com you wrote:
This patch adds the PPC440GX prbdv0 divider to the memory clock equation. This is my first
experience
with u-boot, my thanks to Wolfgang, Travis, and everyone that has contributed. I saw my first
u-boot
prompt after adding this divider with the correct SDRAM settings.
Sorry, but your patch is not usable sind your mailer wrapped the lines and corrupted it.
Please re-send the patch uuencoded or as MIME attachment.
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group.
__________________________________ Do you Yahoo!? Get better spam protection with Yahoo! Mail. http://antispam.yahoo.com/tools
--- ./u-boot-bl/cpu/ppc4xx/speed.c 2004-02-29 14:07:35.000000000 -0600 +++ ./u-boot/cpu/ppc4xx/speed.c 2004-02-29 14:13:04.000000000 -0600 @@ -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;

In message 20040301123628.1655.qmail@web60510.mail.yahoo.com you wrote:
Attached patch file.
Thanks, checked in.
Please don't forget the entry for the CHANGELOG file next time!
Best regards,
Wolfgang Denk
participants (2)
-
Carl Riechers
-
Wolfgang Denk