From patchwork Tue Jun 26 12:15:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 167392 X-Patchwork-Delegate: marek.vasut@gmail.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 157231007D2 for ; Tue, 26 Jun 2012 22:16:21 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4D75C280C9; Tue, 26 Jun 2012 14:15:59 +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 6zBgImNpo82z; Tue, 26 Jun 2012 14:15:59 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F2034280BE; Tue, 26 Jun 2012 14:15:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0B59C280AD for ; Tue, 26 Jun 2012 14:15:32 +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 Wmvpft-N97VD for ; Tue, 26 Jun 2012 14:15:26 +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 mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTPS id AC60A280AC for ; Tue, 26 Jun 2012 14:15:23 +0200 (CEST) Received: from frontend4.mail.m-online.net (unknown [192.168.8.183]) by mail-out.m-online.net (Postfix) with ESMTP id 3WM5mq0NYwz3hj5D; Tue, 26 Jun 2012 14:15:22 +0200 (CEST) X-Auth-Info: F7KBlCeS+euqEMI+cQe4dHNX/TOpPwOyRi6GXrdwj+c= Received: from mashiro.lan (unknown [195.140.253.167]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 3WM5mk4jqTzbbgL; Tue, 26 Jun 2012 14:15:18 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Date: Tue, 26 Jun 2012 14:15:13 +0200 Message-Id: <1340712914-3193-2-git-send-email-marex@denx.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1340712914-3193-1-git-send-email-marex@denx.de> References: <1340712914-3193-1-git-send-email-marex@denx.de> Cc: Marek Vasut Subject: [U-Boot] [PATCH 2/3] KW: Add kw_adjust_dram() weak function 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 This function shall allow a board to adjust DRAM parameters in case there are multiple versions of the board with different DRAM sizes. Signed-off-by: Marek Vasut Cc: Prafulla Wadaskar Cc: Wolfgang Denk --- arch/arm/cpu/arm926ejs/kirkwood/dram.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c b/arch/arm/cpu/arm926ejs/kirkwood/dram.c index ccb6b03..cdf0d21 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c +++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c @@ -60,6 +60,15 @@ u32 kw_sdram_bs(enum memory_bank bank) return result; } +/* + * kw_adjust_sdram - allow post init adjustment of DRAM size + */ +void __kw_adjust_dram(void) +{ +} + +void kw_adjust_dram(void) __attribute__((weak, alias("__kw_adjust_dram"))); + #ifndef CONFIG_SYS_BOARD_DRAM_INIT int dram_init(void) { @@ -91,6 +100,8 @@ int dram_init(void) gd->bd->bi_dram[i].size = 0; } + kw_adjust_dram(); + return 0; }