From 0409934eecc274b625c0d06c50fd5f401b32cef9 Mon Sep 17 00:00:00 2001 From: Kyungmin Park Date: Thu, 17 Dec 2009 19:57:13 +0900 Subject: [PATCH] s5pc110: Pass DMC1 CS1 memory configuration (not yet finished) Signed-off-by: Kyungmin Park --- board/samsung/universal/universal.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/board/samsung/universal/universal.c b/board/samsung/universal/universal.c index 201c52b..bf152af 100644 --- a/board/samsung/universal/universal.c +++ b/board/samsung/universal/universal.c @@ -1674,6 +1674,8 @@ int dram_init(void) { char meminfo[64] = {0,}; unsigned int base, memconfig0, size; + unsigned int memconfig1, sz = 0; + int count = 0; if (cpu_is_s5pc100()) { /* In mem setup, we swap the bank. So below size is correct */ @@ -1705,24 +1707,29 @@ int dram_init(void) * Aquila Rev0.7 4G3G1G */ if (machine_is_aquila() && (hwrevision(5) || hwrevision(7))) { - unsigned int memconfig1, sz; - memconfig1 = readl(base + MEMCONFIG1_OFFSET); sz = (memconfig1 >> 16) & 0xFF; sz = ((unsigned char) ~sz) + 1; sz = sz << 4; - - /* FIXME Disable at this time */ - /* size += sz; */ } } - gd->bd->bi_dram[1].size = size << 20; + /* + * bi_dram[1].size contains all DMC1 memory size + */ + gd->bd->bi_dram[1].size = (size + sz) << 20; - sprintf(meminfo, "mem=%dM mem=%dM@0x%x", + count += sprintf(meminfo, "mem=%dM mem=%dM@0x%x", (int)gd->bd->bi_dram[0].size >> 20, size, (unsigned int)gd->bd->bi_dram[1].start); +#if 0 + if (sz) { + sprintf(meminfo + count, " mem=%dM@0x%x", + sz, memconfig1 & 0xFF000000); + } +#endif + setenv("meminfo", meminfo); return 0; -- 2.7.4