public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] powerpc/p1010rdb: fix calculating ddr_freq_mhz
@ 2013-08-13  8:41 Shengzhou Liu
  2013-08-20 18:16 ` York Sun
  0 siblings, 1 reply; 2+ messages in thread
From: Shengzhou Liu @ 2013-08-13  8:41 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
---
 board/freescale/p1010rdb/spl_minimal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/board/freescale/p1010rdb/spl_minimal.c b/board/freescale/p1010rdb/spl_minimal.c
index 73289f3..d0e712e 100644
--- a/board/freescale/p1010rdb/spl_minimal.c
+++ b/board/freescale/p1010rdb/spl_minimal.c
@@ -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));
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] powerpc/p1010rdb: fix calculating ddr_freq_mhz
  2013-08-13  8:41 [U-Boot] [PATCH] powerpc/p1010rdb: fix calculating ddr_freq_mhz Shengzhou Liu
@ 2013-08-20 18:16 ` York Sun
  0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2013-08-20 18:16 UTC (permalink / raw)
  To: u-boot

On 08/13/2013 01:41 AM, Shengzhou Liu wrote:
> There was a bug for calculating ddr_freq_mhz,
> it should be divided by 1000000 rather than 0x1000000.
> 
> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
> ---
>  board/freescale/p1010rdb/spl_minimal.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied to u-boot-mpc85xx/master.

York

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-20 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13  8:41 [U-Boot] [PATCH] powerpc/p1010rdb: fix calculating ddr_freq_mhz Shengzhou Liu
2013-08-20 18:16 ` York Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox