From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1PocfC-0001Jg-NM for barebox@lists.infradead.org; Sun, 13 Feb 2011 14:11:01 +0000 From: Juergen Beisert Date: Sun, 13 Feb 2011 15:10:47 +0100 Message-Id: <1297606252-802-11-git-send-email-jbe@pengutronix.de> In-Reply-To: <1297606252-802-1-git-send-email-jbe@pengutronix.de> References: <1297606252-802-1-git-send-email-jbe@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 10/15] mini2440: Add SDRAM size autodetection To: barebox@lists.infradead.org Cc: Juergen Beisert From: Juergen Beisert 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 --- arch/arm/boards/mini2440/mini2440.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/boards/mini2440/mini2440.c b/arch/arm/boards/mini2440/mini2440.c index 46581cc..2aeb09e 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 */ -- 1.7.2.3 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox