mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-10-05 20:51:51 +02:00
MX6: Correct calculation of PLL_SYS
DIV_SELECT is used as Fout = Fin * div_select / 2.0, so we should do the shift after the multiply to avoid rounding errors Signed-off-by: Andre Renaud <andre@bluewatersys.com>
This commit is contained in:
parent
85d8a5fc98
commit
2eb268f6fd
@ -80,7 +80,7 @@ static u32 decode_pll(enum pll_clocks pll, u32 infreq)
|
|||||||
div = __raw_readl(&imx_ccm->analog_pll_sys);
|
div = __raw_readl(&imx_ccm->analog_pll_sys);
|
||||||
div &= BM_ANADIG_PLL_SYS_DIV_SELECT;
|
div &= BM_ANADIG_PLL_SYS_DIV_SELECT;
|
||||||
|
|
||||||
return infreq * (div >> 1);
|
return (infreq * div) >> 1;
|
||||||
case PLL_BUS:
|
case PLL_BUS:
|
||||||
div = __raw_readl(&imx_ccm->analog_pll_528);
|
div = __raw_readl(&imx_ccm->analog_pll_528);
|
||||||
div &= BM_ANADIG_PLL_528_DIV_SELECT;
|
div &= BM_ANADIG_PLL_528_DIV_SELECT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user