summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--board/davinci/common/misc.c17
-rw-r--r--include/configs/da850evm.h1
2 files changed, 18 insertions, 0 deletions
diff --git a/board/davinci/common/misc.c b/board/davinci/common/misc.c
index 25ca326500..86a875eeaa 100644
--- a/board/davinci/common/misc.c
+++ b/board/davinci/common/misc.c
@@ -33,6 +33,7 @@
DECLARE_GLOBAL_DATA_PTR;
+#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
int dram_init(void)
{
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
@@ -40,6 +41,22 @@ int dram_init(void)
return(0);
}
+#else
+int dram_init(void)
+{
+ /* dram_init must store complete ramsize in gd->ram_size */
+ gd->ram_size = get_ram_size(
+ (volatile void *)CONFIG_SYS_SDRAM_BASE,
+ CONFIG_MAX_RAM_BANK_SIZE);
+ return 0;
+}
+
+void dram_init_banksize(void)
+{
+ gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+ gd->bd->bi_dram[0].size = gd->ram_size;
+}
+#endif
#ifdef CONFIG_DRIVER_TI_EMAC
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 016a21e9d0..d02b1968b9 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -47,6 +47,7 @@
#define CONFIG_SYS_GBL_DATA_SIZE 128 /* reserved for initial data */
#define PHYS_SDRAM_1 DAVINCI_DDR_EMIF_DATA_BASE /* DDR Start */
#define PHYS_SDRAM_1_SIZE (64 << 20) /* SDRAM size 64MB */
+#define CONFIG_MAX_RAM_BANK_SIZE (512 << 20) /* max size from SPRS586*/
/* memtest start addr */
#define CONFIG_SYS_MEMTEST_START (PHYS_SDRAM_1 + 0x2000000)