diff mbox

[4/4] RX51: Fix SDRAM RFR timings calculation

Message ID 1256573726-29800-5-git-send-email-tero.kristo@nokia.com (mailing list archive)
State Superseded, archived
Delegated to: Tony Lindgren
Headers show

Commit Message

Tero Kristo Oct. 26, 2009, 4:15 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/board-rx51-sdram.c b/arch/arm/mach-omap2/board-rx51-sdram.c
index 237b898..f3b9917 100644
--- a/arch/arm/mach-omap2/board-rx51-sdram.c
+++ b/arch/arm/mach-omap2/board-rx51-sdram.c
@@ -166,7 +166,7 @@  static int set_sdrc_timing_regval_ps(u32 *regval, int st_bit, int end_bit,
 
 static int sdrc_timings(int id, long rate)
 {
-	u32 ticks_per_us;
+	u32 ticks_per_ms;
 	u32 rfr, l;
 	u32 actim_ctrla = 0, actim_ctrlb = 0;
 	u32 rfr_ctrl;
@@ -192,8 +192,8 @@  static int sdrc_timings(int id, long rate)
 	SDRC_SET_ONE(&actim_ctrlb,  12,  14, tCKE, l3_rate);
 	SDRC_SET_ONE(&actim_ctrlb,  16,  17, tWTR, l3_rate);
 
-	ticks_per_us = sdrc_ps_to_ticks(1000000, l3_rate);
-	rfr = rx51_timings[0].tREF * ticks_per_us / 1000;
+	ticks_per_ms = l3_rate;
+	rfr = rx51_timings[0].tREF * ticks_per_ms / 1000000;
 	if (rfr > 65535 + 50)
 		rfr = 65535;
 	else