From patchwork Sat Nov 5 01:55:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 123774 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 68C38B6FD1 for ; Sat, 5 Nov 2011 13:04:09 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 198AC29B85; Sat, 5 Nov 2011 03:01:01 +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 YiaJL0LNSmhu; Sat, 5 Nov 2011 03:01:00 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 15EE1298D2; Sat, 5 Nov 2011 02:57:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3572C29624 for ; Sat, 5 Nov 2011 02:56:31 +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 CsS4dEYfpYdA for ; Sat, 5 Nov 2011 02:56:30 +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.9]) by theia.denx.de (Postfix) with ESMTP id 5CF3F2962B for ; Sat, 5 Nov 2011 02:56:10 +0100 (CET) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 269A21C01DB7 for ; Sat, 5 Nov 2011 02:56:08 +0100 (CET) X-Auth-Info: aIZtLAU/SPoatpWqEZ2BRMYYXgzGpVCOc2F86DSXL00= 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 0B1181C0012D for ; Sat, 5 Nov 2011 02:56:08 +0100 (CET) Received: from gemini.denx.de (unknown [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id 7A988C8CD260 for ; Sat, 5 Nov 2011 02:56:07 +0100 (CET) Received: by gemini.denx.de (Postfix, from userid 500) id 601BF1893017; Sat, 5 Nov 2011 02:56:07 +0100 (CET) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Sat, 5 Nov 2011 02:55:27 +0100 Message-Id: <1320458160-23136-24-git-send-email-wd@denx.de> X-Mailer: git-send-email 1.7.6.4 In-Reply-To: <1320458160-23136-1-git-send-email-wd@denx.de> References: <1320458160-23136-1-git-send-email-wd@denx.de> Subject: [U-Boot] [PATCH 23/56] board/manroland/uc100/pcmcia.c: Fix GCC 4.6 build warnings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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: pcmcia.c: In function 'pcmcia_voltage_set': pcmcia.c:158:25: warning: variable 'pcmp' set but not used [-Wunused-but-set-variable] pcmcia.c:157:20: warning: variable 'immap' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk --- board/manroland/uc100/pcmcia.c | 50 +++++++++++++++++---------------------- 1 files changed, 22 insertions(+), 28 deletions(-) diff --git a/board/manroland/uc100/pcmcia.c b/board/manroland/uc100/pcmcia.c index ad25678..db3821a 100644 --- a/board/manroland/uc100/pcmcia.c +++ b/board/manroland/uc100/pcmcia.c @@ -27,8 +27,8 @@ static void cfg_ports (void) immap = (immap_t *)CONFIG_SYS_IMMR; /* - * Configure Port A for MAX1602 PC-Card Power-Interface Switch - */ + * Configure Port A for MAX1602 PC-Card Power-Interface Switch + */ immap->im_ioport.iop_padat &= ~0x8000; /* set port x output to low */ immap->im_ioport.iop_padir |= 0x8000; /* enable port x as output */ @@ -40,7 +40,6 @@ static void cfg_ports (void) int pcmcia_hardware_enable(int slot) { volatile immap_t *immap; - volatile cpm8xx_t *cp; volatile pcmconf8xx_t *pcmp; volatile sysconf8xx_t *sysp; uint reg, mask; @@ -52,15 +51,14 @@ int pcmcia_hardware_enable(int slot) immap = (immap_t *)CONFIG_SYS_IMMR; sysp = (sysconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_siu_conf)); pcmp = (pcmconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_pcmcia)); - cp = (cpm8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_cpm)); /* Configure Ports for TPS2211A PC-Card Power-Interface Switch */ cfg_ports (); /* - * Configure SIUMCR to enable PCMCIA port B - * (VFLS[0:1] are not used for debugging, we connect FRZ# instead) - */ + * Configure SIUMCR to enable PCMCIA port B + * (VFLS[0:1] are not used for debugging, we connect FRZ# instead) + */ sysp->sc_siumcr &= ~SIUMCR_DBGC11; /* set DBGC to 00 */ /* clear interrupt state, and disable interrupts */ @@ -68,9 +66,9 @@ int pcmcia_hardware_enable(int slot) pcmp->pcmc_per &= ~PCMCIA_MASK(_slot_); /* - * Disable interrupts, DMA, and PCMCIA buffers - * (isolate the interface) and assert RESET signal - */ + * Disable interrupts, DMA, and PCMCIA buffers + * (isolate the interface) and assert RESET signal + */ debug ("Disable PCMCIA buffers and assert RESET\n"); reg = 0; reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */ @@ -78,8 +76,8 @@ int pcmcia_hardware_enable(int slot) udelay(500); /* - * Make sure there is a card in the slot, then configure the interface. - */ + * Make sure there is a card in the slot, then configure the interface. + */ udelay(10000); debug ("[%d] %s: PIPR(%p)=0x%x\n", __LINE__,__FUNCTION__, @@ -90,19 +88,19 @@ int pcmcia_hardware_enable(int slot) } /* - * Power On. - */ + * Power On. + */ mask = PCMCIA_VS1(slot) | PCMCIA_VS2(slot); reg = pcmp->pcmc_pipr; debug ("PIPR: 0x%x ==> VS1=o%s, VS2=o%s\n", reg, (reg&PCMCIA_VS1(slot))?"n":"ff", (reg&PCMCIA_VS2(slot))?"n":"ff"); - if ((reg & mask) == mask) { + + if ((reg & mask) == mask) puts (" 5.0V card found: "); - } else { + else puts (" 3.3V card found: "); - } /* switch VCC on */ immap->im_ioport.iop_padat |= 0x8000; /* power enable 3.3V */ @@ -154,8 +152,6 @@ int pcmcia_hardware_disable(int slot) int pcmcia_voltage_set(int slot, int vcc, int vpp) { - volatile immap_t *immap; - volatile pcmconf8xx_t *pcmp; u_long reg; debug ("voltage_set: " @@ -163,12 +159,10 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp) " Slot %c, Vcc=%d.%d, Vpp=%d.%d\n", 'A'+slot, vcc/10, vcc%10, vpp/10, vcc%10); - immap = (immap_t *)CONFIG_SYS_IMMR; - pcmp = (pcmconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_pcmcia)); /* - * Disable PCMCIA buffers (isolate the interface) - * and assert RESET signal - */ + * Disable PCMCIA buffers (isolate the interface) + * and assert RESET signal + */ debug ("Disable PCMCIA buffers and assert RESET\n"); reg = PCMCIA_PGCRX(_slot_); reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */ @@ -176,10 +170,10 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp) udelay(500); /* - * Configure Port C pins for - * 5 Volts Enable and 3 Volts enable, - * Turn all power pins to Hi-Z - */ + * Configure Port C pins for + * 5 Volts Enable and 3 Volts enable, + * Turn all power pins to Hi-Z + */ debug ("PCMCIA power OFF\n"); cfg_ports (); /* Enables switch, but all in Hi-Z */