[U-Boot] [PATCHv2] fsl_ddr: Don't use full 64-bit divides on 32-bit PowerPC
York Sun
yorksun at freescale.com
Mon Mar 14 21:22:22 CET 2011
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);
> + clks_rem <<= 13;
Shouldn't this be clks_rem >>= 13 ?
> + clks_rem |= clks & (UL_2pow13-1);
> + clks >>= 13;
> +
> + /* If we had a remainder, then round up */
> + if (clks_rem)
> clks++;
> - }
York
More information about the U-Boot
mailing list