summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/mini2440
diff options
context:
space:
mode:
authorJuergen Beisert <juergen@kreuzholzen.de>2011-02-16 19:13:38 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-03-03 16:15:54 +0100
commit1c21bb37bbd8c7e379132f335d7a8717530d1594 (patch)
tree2e72918b8ccab11adcd9d83b4185877a4a94a5e7 /arch/arm/boards/mini2440
parent018fdf06a281d43a167d2a914ad129c92b15ce83 (diff)
downloadbarebox-1c21bb37bbd8c7e379132f335d7a8717530d1594.tar.gz
barebox-1c21bb37bbd8c7e379132f335d7a8717530d1594.tar.xz
mini2440: Add SDRAM size autodetection
If the SDRAM type will change in the future, only the 'config.h' must be adapted to the new settings. The real size will be read back from this setting. Signed-off-by: Juergen Beisert <juergen@kreuzholzen.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/mini2440')
-rw-r--r--arch/arm/boards/mini2440/mini2440.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/boards/mini2440/mini2440.c b/arch/arm/boards/mini2440/mini2440.c
index 46581ccc9c..2aeb09edab 100644
--- a/arch/arm/boards/mini2440/mini2440.c
+++ b/arch/arm/boards/mini2440/mini2440.c
@@ -48,7 +48,6 @@ static struct device_d sdram_dev = {
.id = -1,
.name = "mem",
.map_base = CS6_BASE,
- .size = 64 * 1024 * 1024,
.platform_data = &ram_pdata,
};
@@ -87,6 +86,8 @@ static int mini2440_devices_init(void)
{
uint32_t reg;
+ sdram_dev.size = s3c24x0_get_memory_size();
+
reg = readl(BWSCON);
/* CS#4 to access the network controller */