According to changes in memory configuration in first stage bootloader, we change PHYS_SDRAM_1 from 0x30000000 to 0x20000000. This change revealed problem in memory handling at goni platform, so this patch fix this problem by changing CONFIG_SYS_SDRAM_BASE to 0x40000000.
So far SDRAM base was set to 0x30000000 and total memory size was calulated as sum of memory sizes in all banks. But at goni platform memory address range is not continuous. We have: 0x20000000-0x24ffffff - 80 MiB 0x25000000-0x3fffffff - gap 0x40000000-0x4fffffff - 256 MiB 0x50000000-0x57ffffff - 128 MiB It caused problem - u-boot has seen memory area as continous, so it could try to read/write to memory address in the gap range. The solution would be to create algorithm of handling non-continous memory area, but it's much simpler to omit the first memory range and gap between 0x25000000-0x3fffffff, and set memory base to 0x40000000. It decreases total available memory size from 464 MiB to 384 MiB, but after all we have still more than enough memory for each u-boot feature. Signed-off-by: Robert Baldyga <r.bald...@samsung.com> --- board/samsung/goni/goni.c | 3 +-- include/configs/s5p_goni.h | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c index eb0f9bf..9aceb2e 100644 --- a/board/samsung/goni/goni.c +++ b/board/samsung/goni/goni.c @@ -50,8 +50,7 @@ int power_init_board(void) int dram_init(void) { - gd->ram_size = PHYS_SDRAM_1_SIZE + PHYS_SDRAM_2_SIZE + - PHYS_SDRAM_3_SIZE; + gd->ram_size = PHYS_SDRAM_2_SIZE + PHYS_SDRAM_3_SIZE; return 0; } diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 82bd212..eab9288 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -29,10 +29,10 @@ #define CONFIG_SYS_CLK_FREQ_C110 24000000 /* DRAM Base */ -#define CONFIG_SYS_SDRAM_BASE 0x30000000 +#define CONFIG_SYS_SDRAM_BASE 0x40000000 /* Text Base */ -#define CONFIG_SYS_TEXT_BASE 0x34800000 +#define CONFIG_SYS_TEXT_BASE 0x41800000 #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_CMDLINE_TAG @@ -220,7 +220,7 @@ /* Goni has 3 banks of DRAM, but swap the bank */ #define CONFIG_NR_DRAM_BANKS 3 -#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* OneDRAM Bank #0 */ +#define PHYS_SDRAM_1 0x20000000 /* OneDRAM Bank #0 */ #define PHYS_SDRAM_1_SIZE (80 << 20) /* 80 MB in Bank #0 */ #define PHYS_SDRAM_2 0x40000000 /* mDDR DMC1 Bank #1 */ #define PHYS_SDRAM_2_SIZE (256 << 20) /* 256 MB in Bank #1 */ -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot