Skip to contentSkip to conversation

powerpc/p1010rdb: fix calculating ddr_freq_mhz

PATCH New Shengzhou Liu 2 participants 2 messages Aug 13, 2013 – Aug 20, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 board/freescale/p1010rdb/spl_minimal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
board/freescale/p1010rdb/spl_minimal.c +1 -1
index 73289f3..d0e712e 100644
@@ -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));
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 powerpc/p1010rdb: fix calculating ddr_freq_mhz

Quoted 7 lines · Shengzhou Liu

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

---
 board/freescale/p1010rdb/spl_minimal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied to u-boot-mpc85xx/master.

York