From patchwork Wed Aug 1 04:13:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 174376 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 0DB0B2C009B for ; Wed, 1 Aug 2012 14:15:39 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 470BB280A5; Wed, 1 Aug 2012 06:15:02 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d3fsLK-qNV6X; Wed, 1 Aug 2012 06:15:02 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 03631280CD; Wed, 1 Aug 2012 06:14:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B13D4280A0 for ; Wed, 1 Aug 2012 06:14:04 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Io8+okzGZaZX for ; Wed, 1 Aug 2012 06:14:04 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from avon.wwwdotorg.org (avon.wwwdotorg.org [70.85.31.133]) by theia.denx.de (Postfix) with ESMTPS id 22CCB28087 for ; Wed, 1 Aug 2012 06:14:00 +0200 (CEST) Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id 36ACC9EA3A; Tue, 31 Jul 2012 22:19:54 -0600 (MDT) Received: from dart.wwwdotorg.org.wwwdotorg.org (c-98-245-172-142.hsd1.co.comcast.net [98.245.172.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id 689A9E461A; Tue, 31 Jul 2012 22:13:57 -0600 (MDT) From: Stephen Warren To: Albert Aribaud Date: Tue, 31 Jul 2012 22:13:39 -0600 Message-Id: <1343794423-30553-10-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343794423-30553-1-git-send-email-swarren@wwwdotorg.org> References: <1343794423-30553-1-git-send-email-swarren@wwwdotorg.org> X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.96.5 at avon.wwwdotorg.org X-Virus-Status: Clean Cc: u-boot@lists.denx.de, linux-rpi-kernel@lists.infradead.org, Tom Rini , Oleksandr Tymoshenko Subject: [U-Boot] [PATCH V2 09/13] ARM: rpi_b: drop RAM size to 128M X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The board really has 256M. However, the VC (VideoCore co-processor) shares the RAM, and uses a configurable portion at the top. We tell U-Boot that a smaller amount of RAM is present in order to avoid stomping on the area the VC uses. Extracted from work by Oleksandr Tymoshenko . Signed-off-by: Stephen Warren --- v2: Modified location new define was inserted, in order to drop a later cleanup patch. --- board/raspberrypi/rpi_b/rpi_b.c | 2 +- include/configs/rpi_b.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/board/raspberrypi/rpi_b/rpi_b.c b/board/raspberrypi/rpi_b/rpi_b.c index 26df74b..688b0aa 100644 --- a/board/raspberrypi/rpi_b/rpi_b.c +++ b/board/raspberrypi/rpi_b/rpi_b.c @@ -21,7 +21,7 @@ DECLARE_GLOBAL_DATA_PTR; int dram_init(void) { - gd->ram_size = SZ_256M; + gd->ram_size = CONFIG_SYS_SDRAM_SIZE; return 0; } diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h index 9c96d0e..73482d9 100644 --- a/include/configs/rpi_b.h +++ b/include/configs/rpi_b.h @@ -37,6 +37,13 @@ #define CONFIG_SYS_SDRAM_BASE 0x00000000 #define CONFIG_SYS_TEXT_BASE 0x00008000 #define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE +/* + * The board really has 256M. However, the VC (VideoCore co-processor) shares + * the RAM, and uses a configurable portion at the top. We tell U-Boot that a + * smaller amount of RAM is present in order to avoid stomping on the area + * the VC uses. + */ +#define CONFIG_SYS_SDRAM_SIZE SZ_128M #define CONFIG_SYS_INIT_RAM_SIZE SZ_4K #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + \ CONFIG_SYS_INIT_RAM_SIZE - \