Orion5x: Correct DRAM bank detection
authorRogan Dawes <rogan@dawes.za.net>
Wed, 13 Apr 2011 18:24:53 +0000 (23:54 +0530)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Wed, 27 Apr 2011 17:38:08 +0000 (19:38 +0200)
arch/arm/cpu/arm926ejs/orion5x/dram.c
arch/arm/include/asm/arch-orion5x/orion5x.h

index b749282099061f0210bf71fdcc5c2adac90e5b11..2ae8f487f6e5d98ac1fbc5634c9c3529b052c980 100644 (file)
@@ -38,7 +38,7 @@ u32 orion5x_sdram_bar(enum memory_bank bank)
 {
        struct orion5x_ddr_addr_decode_registers *winregs =
                (struct orion5x_ddr_addr_decode_registers *)
-               ORION5X_CPU_WIN_BASE;
+               ORION5X_DRAM_BASE;
 
        u32 result = 0;
        u32 enable = 0x01 & winregs[bank].size;
index e3d3f76dbb519b94381c0aa114302bf28e6af021..1dd9f65ab203082958b9fdd6cc3124b5459a46a7 100644 (file)
@@ -42,6 +42,7 @@
 #define ORION5X_REGISTER(x)                    (ORION5X_REGS_PHY_BASE + x)
 
 /* Documented registers */
+#define ORION5X_DRAM_BASE                      (ORION5X_REGISTER(0x01500))
 #define ORION5X_TWSI_BASE                      (ORION5X_REGISTER(0x11000))
 #define ORION5X_UART0_BASE                     (ORION5X_REGISTER(0x12000))
 #define ORION5X_UART1_BASE                     (ORION5X_REGISTER(0x12100))