[U-Boot] [PATCH] powerpc/85xx: Change timebase divisor to be defined per processor

Tabi Timur-B04825 B04825 at freescale.com
Fri Apr 22 13:50:10 CEST 2011


On Thu, Apr 21, 2011 at 1:59 PM, Kumar Gala <galak at kernel.crashing.org> wrote:
> Introduce new CONFIG_SYS_FSL_TBCLK_DIV on 85xx platforms because
> different SoCs have different divisor amounts.  All the PQ3 parts are
> /8, the P4080/P4080 is /16, and P2040/P3041/P5020 are /32.

Shouldn't there also be a README update to document this option?

> +       unsigned long tbclk_div = CONFIG_SYS_FSL_TBCLK_DIV;
> +
> +       return (gd->bus_clk + (tbclk_div >> 1)) / tbclk_div;

Why not just:

return (gd->bus_clk + (CONFIG_SYS_FSL_TBCLK_DIV / 2)) /
CONFIG_SYS_FSL_TBCLK_DIV;

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the U-Boot mailing list