On Sat, May 22, 2010 at 5:36 PM, Kumar Gala <ga...@kernel.crashing.org> wrote:

> +static unsigned long
> +ics307_clk_freq(unsigned char cw0, unsigned char cw1, unsigned char cw2)

You forgot to change these to u8

Also, you can declare this function as "const".  You could just use
the version of this function that I posted, you just need to remove my
rounding code.

> +        * Adding 1 to get a "nicely" rounded number, but this needs
> +        * more tweaking to get a "properly" rounded number.
> +        */
> +
> +       freq = 1 + (input_freq * 2 * (vdw + 8) / ((rdw + 2) * od));

The "1 +" is wrong and should be removed.  It doesn't do what the
comment says it does, and as you said earlier, rounding is wrong for
this function.

-- 
Timur Tabi
Linux kernel developer at Freescale
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to