From patchwork Sat May 3 00:28:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: York Sun X-Patchwork-Id: 345289 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 CD5C914015E for ; Sat, 3 May 2014 10:28:48 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8D5E14BD60; Sat, 3 May 2014 02:28:47 +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 SxPLQWXPjggZ; Sat, 3 May 2014 02:28:47 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 700654BDA0; Sat, 3 May 2014 02:28:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A33484BDB8 for ; Sat, 3 May 2014 02:28:41 +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 wqTvYMosDerq for ; Sat, 3 May 2014 02:28:38 +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 na01-bn1-obe.outbound.protection.outlook.com (mail-bn1lp0145.outbound.protection.outlook.com [207.46.163.145]) by theia.denx.de (Postfix) with ESMTPS id 9743D4BDA0 for ; Sat, 3 May 2014 02:28:29 +0200 (CEST) Received: from CH1PR03CA002.namprd03.prod.outlook.com (10.255.156.147) by BLUPR03MB392.namprd03.prod.outlook.com (10.141.78.28) with Microsoft SMTP Server (TLS) id 15.0.929.12; Sat, 3 May 2014 00:28:17 +0000 Received: from BN1BFFO11FD037.protection.gbl (10.255.156.132) by CH1PR03CA002.outlook.office365.com (10.255.156.147) with Microsoft SMTP Server (TLS) id 15.0.934.12 via Frontend Transport; Sat, 3 May 2014 00:28:17 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.1) by BN1BFFO11FD037.mail.protection.outlook.com (10.58.144.100) with Microsoft SMTP Server (TLS) id 15.0.929.8 via Frontend Transport; Sat, 3 May 2014 00:28:17 +0000 Received: from oslab-l1.am.freescale.net ([10.214.80.102]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s430S8gH012723; Fri, 2 May 2014 17:28:10 -0700 From: York Sun To: Date: Fri, 2 May 2014 17:28:05 -0700 Message-ID: <1399076885-449-2-git-send-email-yorksun@freescale.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1399076885-449-1-git-send-email-yorksun@freescale.com> References: <1399076885-449-1-git-send-email-yorksun@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.1; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009001)(6009001)(54534003)(199002)(189002)(87936001)(88136002)(50226001)(36756003)(6806004)(87286001)(50466002)(44976005)(80976001)(77156001)(48376002)(19580395003)(81342001)(19580405001)(83322001)(74502001)(81542001)(33646001)(62966002)(20776003)(47776003)(31966008)(74662001)(79102001)(80022001)(46102001)(4396001)(85852003)(76176999)(77096999)(77982001)(76482001)(86362001)(92726001)(93916002)(89996001)(83072002)(92566001)(50986999)(99396002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB392; H:tx30smr01.am.freescale.net; FPR:EEF2F3DC.2CB26548.4A774BDB.9CCA227A.20121; MLV:sfv; PTR:gate-tx3.freescale.com; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Forefront-PRVS: 0200DDA8BE Received-SPF: Fail (: domain of freescale.com does not designate 192.88.168.1 as permitted sender) receiver=; client-ip=192.88.168.1; helo=tx30smr01.am.freescale.net; X-OriginatorOrg: freescale.com Cc: scottwood@freescale.com, u-boot@lists.denx.de, York Sun Subject: [U-Boot] [Patch v5 2/2] common/board_f: Fix size variable 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de DRAM size should use 64-bit variable when the size could be more than 4GB. Caught and verified on P4080DS with 4GB DDR. Signed-off-by: York Sun Acked-by: Simon Glass --- Change log v5: no change since v1 common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/board_f.c b/common/board_f.c index 7601a98..c268cf9 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -194,7 +194,7 @@ static int init_func_ram(void) static int show_dram_config(void) { - ulong size; + unsigned long long size; #ifdef CONFIG_NR_DRAM_BANKS int i;