[U-Boot] [PATCH 4/7] fsl_ddr: Don't use full 64-bit divides on 32-bit PowerPC

Wolfgang Denk wd at denx.de
Mon Feb 21 22:16:19 CET 2011


Dear Kyle Moffett,

In message <1298311199-18775-5-git-send-email-Kyle.D.Moffett at boeing.com> you wrote:
> The current FreeScale MPC-8xxx DDR SPD interpreter is using full 64-bit
> integer divide operations to convert between nanoseconds and DDR clock
> cycles given arbitrary DDR clock frequencies.
> 
> Since all of the inputs to this are 32-bit (nanoseconds, clock cycles,
> and DDR frequencies), we can easily restructure the computation to use
> the "do_div()" function to perform 64-bit/32-bit divide operations.
> 
> This decreases compute time rather significantly for each conversion and
> avoids bringing in a very complicated function from libgcc.
> 
> It should be noted that nothing else in U-Boot or the Linux kernel seems
> to require a full 64-bit divide on any 32-bit PowerPC.
> 
> Build-and-boot-tested on the HWW-1U-1A board using DDR2 SPD detection.
> 
> Signed-off-by: Kyle Moffett <Kyle.D.Moffett at boeing.com>
> ---
> 
> Author's note:  This patch really needs a bunch more review and testing, but
> I only have access to a very limited selection of hardware.  Please let me
> know about any questions or concerns.

This patch should be split off the patch series and submitted
separately.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"A witty saying proves nothing."                           - Voltaire


More information about the U-Boot mailing list