Message ID | 1257926592-14782-2-git-send-email-mike@compulab.co.il |
---|---|
State | Rejected |
Delegated to: | Sandeep Paulraj |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id D59FB28BBC for <wd@gemini.denx.de>; Wed, 11 Nov 2009 10:14:04 +0100 (CET) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id C84DEC7FA5CC for <wd@localhost>; Wed, 11 Nov 2009 10:14:04 +0100 (MET) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.9) for <wd@localhost> (single-drop); Wed, 11 Nov 2009 10:14:04 +0100 (MET) Received: from murder (svr19.m-online.net [192.168.3.147]) by backend2 (Cyrus v2.2.12) with LMTPA; Wed, 11 Nov 2009 10:13:48 +0100 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend3.pop.m-online.net (Cyrus v2.2.13) with LMTPA; Wed, 11 Nov 2009 10:13:46 +0100 Received: from scanner-4.m-online.net (scanner-4.m-online.net [192.168.1.18]) by mail.m-online.net (Postfix) with ESMTP id 8D63B20184F; Wed, 11 Nov 2009 10:03:43 +0100 (CET) Received: from mxin-1.m-online.net ([192.168.1.21]) by scanner-4.m-online.net (scanner-4.m-online.net [192.168.1.18]) (amavisd-new, port 10026) with ESMTP id 13392-05-3; Wed, 11 Nov 2009 10:03:38 +0100 (CET) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-2.m-online.net (Postfix) with ESMTP id E59B746506C; Wed, 11 Nov 2009 10:03:37 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 401E02807D; Wed, 11 Nov 2009 10:03:32 +0100 (CET) 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 Kc+6r+GFxiQ6; Wed, 11 Nov 2009 10:03:31 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8933F2807E; Wed, 11 Nov 2009 10:03:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BE81F2807B for <u-boot@lists.denx.de>; Wed, 11 Nov 2009 10:03:23 +0100 (CET) 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 jq1Y0JaPbolt for <u-boot@lists.denx.de>; Wed, 11 Nov 2009 10:03:23 +0100 (CET) X-Greylist: delayed 3612 seconds by postgrey-1.27 at theia; Wed, 11 Nov 2009 10:03:20 CET Received: from compulab.co.il (compulab.co.il [67.18.134.219]) by theia.denx.de (Postfix) with ESMTP id 06D2A28078 for <u-boot@lists.denx.de>; Wed, 11 Nov 2009 10:03:20 +0100 (CET) Received: from [62.90.235.247] (helo=zimbra-mta.compulab.co.il) by compulab.site5.com with esmtp (Exim 4.69) (envelope-from <mike@compulab.co.il>) id 1N88Aq-0002Wg-06 for u-boot@lists.denx.de; Wed, 11 Nov 2009 02:03:28 -0600 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id 2EFD99A0360 for <u-boot@lists.denx.de>; Wed, 11 Nov 2009 10:03:13 +0200 (IST) Received: from zimbra-mta.compulab.co.il ([127.0.0.1]) by localhost (zimbra-mta.compulab.co.il [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cxWFlohMoelK; Wed, 11 Nov 2009 10:03:12 +0200 (IST) Received: from gentoodev.compulab.local (mike-pc.compulab.local [10.1.1.95]) by zimbra-mta.compulab.co.il (Postfix) with ESMTP id D106F9A034F; Wed, 11 Nov 2009 10:03:12 +0200 (IST) Received: from gentoodev.compulab.local (localhost [127.0.0.1]) by gentoodev.compulab.local (8.14.0/8.14.0) with ESMTP id nAB83CJZ014809; Wed, 11 Nov 2009 10:03:12 +0200 Received: (from mike@localhost) by gentoodev.compulab.local (8.14.0/8.14.0/Submit) id nAB83COl014808; Wed, 11 Nov 2009 10:03:12 +0200 X-Authentication-Warning: gentoodev.compulab.local: mike set sender to mike@compulab.co.il using -f From: Mike Rapoport <mike@compulab.co.il> To: u-boot@lists.denx.de Date: Wed, 11 Nov 2009 10:03:10 +0200 Message-Id: <1257926592-14782-2-git-send-email-mike@compulab.co.il> X-Mailer: git-send-email 1.6.0.6 X-ACL-Warn: { X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - compulab.site5.com X-AntiAbuse: Original Domain - lists.denx.de X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - compulab.co.il X-Source: X-Source-Args: X-Source-Dir: Cc: Mike Rapoport <mike@compulab.co.il> Subject: [U-Boot] [PATCH] omap3: fix bi_dram initialization when CONFIG_NR_DRAM_BANKS is 1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <http://lists.denx.de/mailman/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <http://lists.denx.de/mailman/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net |
diff --git a/cpu/arm_cortexa8/omap3/board.c b/cpu/arm_cortexa8/omap3/board.c index dd2c940..0b3805a 100644 --- a/cpu/arm_cortexa8/omap3/board.c +++ b/cpu/arm_cortexa8/omap3/board.c @@ -291,8 +291,11 @@ int dram_init(void) gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = size0; + +#if (CONFIG_NR_DRAM_BANKS > 1) gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1); gd->bd->bi_dram[1].size = size1; +#endif return 0; }
When CONFIG_NR_DRAM_BANKS is 1 gd->bd->bi_dram[1] assignment exceeds bi_dram array bounds. Perform it only if CONFIG_NR_DRAM_BANKS is greater than 1. Signed-off-by: Mike Rapoport <mike@compulab.co.il> --- cpu/arm_cortexa8/omap3/board.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)