From patchwork Fri Dec 9 11:14:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 130346 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 E8E48B6F62 for ; Fri, 9 Dec 2011 22:16:02 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8A678281CA; Fri, 9 Dec 2011 12:15:35 +0100 (CET) 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 xwmE0OQ6vrTC; Fri, 9 Dec 2011 12:15:35 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 156E42817C; Fri, 9 Dec 2011 12:15:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 253142813F for ; Fri, 9 Dec 2011 12:14:40 +0100 (CET) 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 nTk1R+fjoFqX for ; Fri, 9 Dec 2011 12:14:39 +0100 (CET) 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 ESMTP id 5A14428149 for ; Fri, 9 Dec 2011 12:14:36 +0100 (CET) Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 6C6361853BA6; Fri, 9 Dec 2011 12:14:34 +0100 (CET) X-Auth-Info: oY64UaKl1mSYKzJI3AMV6b7XncHWXNtA8Dgn2W26M+k= Received: from diddl.denx.de (host-80-81-18-216.customer.m-online.net [80.81.18.216]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id B5DE21C0012B; Fri, 9 Dec 2011 12:14:34 +0100 (CET) Received: from gemini.denx.de (unknown [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id 9111C1A375F; Fri, 9 Dec 2011 12:14:34 +0100 (CET) Received: by gemini.denx.de (Postfix, from userid 500) id 706691A32834; Fri, 9 Dec 2011 12:14:34 +0100 (CET) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Fri, 9 Dec 2011 12:14:25 +0100 Message-Id: <1323429272-26801-7-git-send-email-wd@denx.de> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1323429272-26801-1-git-send-email-wd@denx.de> References: <1323429272-26801-1-git-send-email-wd@denx.de> Cc: Kyungmin Park Subject: [U-Boot] [PATCH 06/13] board/apollon/apollon.c: Fix GCc 4.6 build warnings. 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 Fix: apollon.c: In function 'dram_init': apollon.c:188:29: warning: variable 'cpu' set but not used [-Wunused-but-set-variable] apollon.c:188:20: warning: variable 'rev' set but not used [-Wunused-but-set-variable] apollon.c:187:26: warning: variable 'size1' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk Cc: Kyungmin Park --- board/apollon/apollon.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/board/apollon/apollon.c b/board/apollon/apollon.c index 4768f58..76626f0 100644 --- a/board/apollon/apollon.c +++ b/board/apollon/apollon.c @@ -184,14 +184,12 @@ eth_reset_err_out: **********************************************/ int dram_init(void) { - unsigned int size0 = 0, size1 = 0; - u32 mtype, btype, rev = 0, cpu = 0; + unsigned int size; + u32 mtype, btype; #define NOT_EARLY 0 btype = get_board_type(); mtype = get_mem_type(); - rev = get_cpu_rev(); - cpu = get_cpu_type(); display_board_info(btype); @@ -200,14 +198,16 @@ int dram_init(void) do_sdrc_init(SDRC_CS1_OSET, NOT_EARLY); } - size0 = get_sdr_cs_size(SDRC_CS0_OSET); - size1 = get_sdr_cs_size(SDRC_CS1_OSET); + size = get_sdr_cs_size(SDRC_CS0_OSET); gd->bd->bi_dram[0].start = PHYS_SDRAM_1; - gd->bd->bi_dram[0].size = size0; + gd->bd->bi_dram[0].size = size; #if CONFIG_NR_DRAM_BANKS > 1 - gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + size0; - gd->bd->bi_dram[1].size = size1; + size = get_sdr_cs_size(SDRC_CS1_OSET); + + gd->bd->bi_dram[1].start = gd->bd->bi_dram[0].start + + gd->bd->bi_dram[0].size; + gd->bd->bi_dram[1].size = size; #endif return 0;