[UNIVERSAL] Use continuous memory area 208MiB
authorKyungmin Park <kyungmin.park@samsung.com>
Wed, 17 Jun 2009 10:58:50 +0000 (19:58 +0900)
committerKyungmin Park <kyungmin.park@samsung.com>
Wed, 17 Jun 2009 10:58:50 +0000 (19:58 +0900)
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
cpu/arm_cortexa8/s5pc100/cpu_init.S
include/configs/s5pc100_universal.h

index 11f3acb..efc2371 100644 (file)
@@ -66,6 +66,7 @@ mem_ctrl_asm_init:
        str     r1, [r6, #0x004]                        @ S5P_MEMCONTROL
 
        /*
+        * Bank0: Mobile DDR
         * 0x20 -> 0x20000000
         * 0xf8 -> 0x27FFFFFF
         * [15:12] 0: Linear
@@ -74,9 +75,14 @@ mem_ctrl_asm_init:
         * [ 3:0 ] 2: 4 banks
         */
        ldr     r1, =0x20f80222
+#ifdef CONFIG_S5PC1XX_SWAP_MEMORY_BANK
+       /* Bank0: OneDRAM is located at 0x28000000 */
+       orr     r1, r1, #0x08000000
+#endif
        str     r1, [r6, #0x008]                        @ S5P_MEMCONFIG0
 
        /*
+        * Bank1: OneDRAM
         * 0x28 -> 0x28000000
         * 0xf8 -> 0x2fFFFFFF
         * [15:12] 0: Linear
@@ -85,6 +91,10 @@ mem_ctrl_asm_init:
         * [ 3:0 ] 2: 4 banks
         */
        ldr     r1, =0x28f80222
+#ifdef CONFIG_S5PC1XX_SWAP_MEMORY_BANK
+       /* Bank1: Mobile DDR is located at 0x20000000 */
+       bic     r1, r1, #0x08000000
+#endif
        str     r1, [r6, #0x00c]                        @ S5P_MEMCONFIG1
 
        ldr     r1, =0x20000000
index cfa0c51..871786f 100644 (file)
         " initrd=0x23000000,8M ramdisk=8192\0" \
        "rootfstype=cramfs\0" \
        "mtdparts=" MTDPARTS_DEFAULT "\0" \
-       "meminfo=mem=80M,128M@0x28000000\0" \
+       "meminfo=mem=208M" \
        "nfsroot=/nfsroot/arm\0" \
        "bootblock=5\0" \
        "ubiblock=4\0" \
 #define CONFIG_SYNC_MODE
 */
 
-/* Universal has 2 banks of DRAM */
+/* Universal has 2 banks of DRAM, but swap the bank */
 #define CONFIG_NR_DRAM_BANKS   2
+#define CONFIG_S5PC1XX_SWAP_MEMORY_BANK                1
 #define PHYS_SDRAM_1           CONFIG_SYS_SDRAM_BASE   /* OneDRAM Bank #0 */
 #define PHYS_SDRAM_1_SIZE      0x05000000              /* 80 MB in Bank #0 */
 #define PHYS_SDRAM_2           0x28000000              /* MobileDDR Bank #1 */