OMAP3: Fix SDRC init
authorNishanth Menon <nm@ti.com>
Mon, 9 Nov 2009 14:29:34 +0000 (09:29 -0500)
committerTom Rix <Tom.Rix@windriver.com>
Fri, 27 Nov 2009 22:26:17 +0000 (16:26 -0600)
Defaults are for Infineon DDR timings.
Since none of the supported boards currently do
XIP boot, these seem to be faulty. fix the values
as per the calculations(ACTIMA,B), conf
the sdrc power with pwdnen and wakeupproc bits

Signed-off-by: Nishanth Menon <nm@ti.com>
cpu/arm_cortexa8/omap3/mem.c
include/asm-arm/arch-omap3/cpu.h

index 2c2d4f7..dfb7e4c 100644 (file)
@@ -164,7 +164,8 @@ void do_sdrc_init(u32 cs, u32 early)
                writel(SDRC_SHARING, &sdrc_base->sharing);
 
                /* Disable Power Down of CKE cuz of 1 CKE on combo part */
-               writel(SRFRONRESET | PAGEPOLICY_HIGH, &sdrc_base->power);
+               writel(WAKEUPPROC | PWDNEN | SRFRONRESET | PAGEPOLICY_HIGH,
+                               &sdrc_base->power);
 
                writel(ENADLL | DLLPHASE_90, &sdrc_base->dlla_ctrl);
                sdelay(0x20000);
index 8ab2e39..e51c4f3 100644 (file)
@@ -222,6 +222,7 @@ struct sdrc {
 
 #define PAGEPOLICY_HIGH                (0x1 << 0)
 #define SRFRONRESET            (0x1 << 7)
+#define PWDNEN                 (0x1 << 2)
 #define WAKEUPPROC             (0x1 << 26)
 
 #define DDR_SDRAM              (0x1 << 0)