Re: [U-Boot] [PATCHv2] fsl_ddr: Don't use full 64-bit divides on32-bit PowerPC

2011-08-03 Thread Moffett, Kyle D
On Jul 29, 2011, at 17:46, York Sun wrote: > On Fri, 2011-07-29 at 16:26 -0500, Moffett, Kyle D wrote: >> On Jul 29, 2011, at 14:46, York Sun wrote: >>> On Fri, 2011-07-29 at 11:35 -0700, York Sun wrote: On Fri, 2011-07-29 at 12:20 -0500, Moffett, Kyle D wrote: > On Jul 28, 2011, at 17:41,

Re: [U-Boot] [PATCHv2] fsl_ddr: Don't use full 64-bit divides on32-bit PowerPC

2011-07-29 Thread York Sun
On Fri, 2011-07-29 at 16:26 -0500, Moffett, Kyle D wrote: > On Jul 29, 2011, at 14:46, York Sun wrote: > > On Fri, 2011-07-29 at 11:35 -0700, York Sun wrote: > >> On Fri, 2011-07-29 at 12:20 -0500, Moffett, Kyle D wrote: > >>> On Jul 28, 2011, at 17:41, York Sun wrote: > I found a problem with

Re: [U-Boot] [PATCHv2] fsl_ddr: Don't use full 64-bit divides on32-bit PowerPC

2011-07-29 Thread Moffett, Kyle D
On Jul 29, 2011, at 14:46, York Sun wrote: > On Fri, 2011-07-29 at 11:35 -0700, York Sun wrote: >> On Fri, 2011-07-29 at 12:20 -0500, Moffett, Kyle D wrote: >>> On Jul 28, 2011, at 17:41, York Sun wrote: I found a problem with the round up. Please try picos_to_mclk(mclk_to_picos(3))

Re: [U-Boot] [PATCHv2] fsl_ddr: Don't use full 64-bit divides on32-bit PowerPC

2011-07-29 Thread York Sun
On Fri, 2011-07-29 at 11:35 -0700, York Sun wrote: > Kyle, > > On Fri, 2011-07-29 at 12:20 -0500, Moffett, Kyle D wrote: > > On Jul 28, 2011, at 17:41, York Sun wrote: > > > On Mon, 2011-03-14 at 16:35 -0500, Moffett, Kyle D wrote: > > >> On Mar 14, 2011, at 16:22, York Sun wrote: > > >>> On Wed,

Re: [U-Boot] [PATCHv2] fsl_ddr: Don't use full 64-bit divides on32-bit PowerPC

2011-07-29 Thread York Sun
Kyle, On Fri, 2011-07-29 at 12:20 -0500, Moffett, Kyle D wrote: > On Jul 28, 2011, at 17:41, York Sun wrote: > > On Mon, 2011-03-14 at 16:35 -0500, Moffett, Kyle D wrote: > >> On Mar 14, 2011, at 16:22, York Sun wrote: > >>> On Wed, 2011-02-23 at 11:35 -0500, Kyle Moffett wrote: > + *

Re: [U-Boot] [PATCHv2] fsl_ddr: Don't use full 64-bit divides on32-bit PowerPC

2011-07-29 Thread Moffett, Kyle D
On Jul 28, 2011, at 17:41, York Sun wrote: > On Mon, 2011-03-14 at 16:35 -0500, Moffett, Kyle D wrote: >> On Mar 14, 2011, at 16:22, York Sun wrote: >>> On Wed, 2011-02-23 at 11:35 -0500, Kyle Moffett wrote: + * Now divide by 5^12 and track the 32-bit remainder, then divide + * by 2*(

Re: [U-Boot] [PATCHv2] fsl_ddr: Don't use full 64-bit divides on32-bit PowerPC

2011-07-28 Thread York Sun
Kyle, On Mon, 2011-03-14 at 16:35 -0500, Moffett, Kyle D wrote: > On Mar 14, 2011, at 16:22, York Sun wrote: > > On Wed, 2011-02-23 at 11:35 -0500, Kyle Moffett wrote: > >> + * Now divide by 5^12 and track the 32-bit remainder, then divide > >> + * by 2*(2^12) using shifts (and updating the re

Re: [U-Boot] [PATCHv2] fsl_ddr: Don't use full 64-bit divides on32-bit PowerPC

2011-03-14 Thread Moffett, Kyle D
On Mar 14, 2011, at 16:22, York Sun wrote: > On Wed, 2011-02-23 at 11:35 -0500, Kyle Moffett wrote: >> + * Now divide by 5^12 and track the 32-bit remainder, then divide >> + * by 2*(2^12) using shifts (and updating the remainder). >> + */ >> +clks_rem = do_div(clks, UL_5pow12); >>

Re: [U-Boot] [PATCHv2] fsl_ddr: Don't use full 64-bit divides on32-bit PowerPC

2011-03-14 Thread Moffett, Kyle D
On Mar 14, 2011, at 14:19, York Sun wrote: > On Wed, 2011-02-23 at 11:35 -0500, Kyle Moffett 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. >

Re: [U-Boot] [PATCHv2] fsl_ddr: Don't use full 64-bit divides on32-bit PowerPC

2011-03-14 Thread York Sun
Kyle, On Mon, 2011-03-14 at 14:04 -0500, Moffett, Kyle D wrote: > On 64-bit this change is basically a no-op, because do_div() is implemented > as a literal 64-bit divide operation and the instruction scheduling works out > almost the same. > > On 32-bit PowerPC a fully accurate 64/64 divide (_