Skip to content
Snippets Groups Projects
Commit e1a2a340 authored by Shengzhou Liu's avatar Shengzhou Liu Committed by York Sun
Browse files

powerpc/p1010rdb: fix calculating ddr_freq_mhz


There was a bug for calculating ddr_freq_mhz,
it should be divided by 1000000 rather than 0x1000000.

Signed-off-by: default avatarShengzhou Liu <Shengzhou.Liu@freescale.com>
Acked-by: default avatarYork Sun <yorksun@freescale.com>
parent 1c68d01e
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ void sdram_init(void)
ddr_ratio = in_be32(&gur->porpllsr) & MPC85xx_PORPLLSR_DDR_RATIO;
ddr_ratio = ddr_ratio >> MPC85xx_PORPLLSR_DDR_RATIO_SHIFT;
ddr_freq_mhz = (CONFIG_SYS_CLK_FREQ * ddr_ratio) / 0x1000000;
ddr_freq_mhz = (CONFIG_SYS_CLK_FREQ * ddr_ratio) / 1000000;
/* mask off E bit */
u32 svr = SVR_SOC_VER(mfspr(SPRN_SVR));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment