board/netta/pcmcia.c: Fix GCC 4.6 build warnings

Fix:
pcmcia.c: In function 'cfg_ports':
pcmcia.c:151:21: warning: variable 'cp' set but not used
[-Wunused-but-set-variable]
pcmcia.c:150:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]
pcmcia.c: In function 'pcmcia_hardware_enable':
pcmcia.c:179:25: warning: variable 'sysp' set but not used
[-Wunused-but-set-variable]
pcmcia.c:177:21: warning: variable 'cp' set but not used
[-Wunused-but-set-variable]
pcmcia.c:176:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]
pcmcia.c: In function 'pcmcia_hardware_disable':
pcmcia.c:271:25: warning: variable 'pcmp' set but not used
[-Wunused-but-set-variable]
pcmcia.c:270:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]
pcmcia.c: In function 'pcmcia_voltage_set':
pcmcia.c:303:9: warning: variable 'sreg' set but not used
[-Wunused-but-set-variable]
pcmcia.c:300:21: warning: variable 'cp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
Wolfgang Denk 2011-11-04 15:55:30 +00:00
parent a1821971cd
commit 964f0df31d
1 changed files with 26 additions and 50 deletions

View File

@ -147,13 +147,6 @@ static void set_shdn(int what)
static void cfg_ports (void)
{
volatile immap_t *immap;
volatile cpm8xx_t *cp;
immap = (immap_t *)CONFIG_SYS_IMMR;
cp = (cpm8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_cpm));
cfg_vppd(0); cfg_vppd(1); /* VPPD0,VPPD1 VAVPP => Hi-Z */
cfg_vccd(0); cfg_vccd(1); /* 3V and 5V off */
cfg_shdn();
@ -173,10 +166,7 @@ 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, pipr, mask;
int i;
@ -184,10 +174,7 @@ int pcmcia_hardware_enable(int slot)
udelay(10000);
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 ();
@ -267,15 +254,10 @@ int pcmcia_hardware_enable(int slot)
#if defined(CONFIG_CMD_PCMCIA)
int pcmcia_hardware_disable(int slot)
{
volatile immap_t *immap;
volatile pcmconf8xx_t *pcmp;
u_long reg;
debug ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
immap = (immap_t *)CONFIG_SYS_IMMR;
pcmp = (pcmconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_pcmcia));
/* Configure PCMCIA General Control Register */
debug ("Disable PCMCIA buffers and assert RESET\n");
reg = 0;
@ -296,19 +278,14 @@ int pcmcia_hardware_disable(int slot)
int pcmcia_voltage_set(int slot, int vcc, int vpp)
{
volatile immap_t *immap;
volatile cpm8xx_t *cp;
volatile pcmconf8xx_t *pcmp;
u_long reg;
ushort sreg;
debug ("voltage_set: "
PCMCIA_BOARD_MSG
" 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;
cp = (cpm8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_cpm));
pcmp = (pcmconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_pcmcia));
/*
* Disable PCMCIA buffers (isolate the interface)
@ -329,7 +306,6 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp)
debug ("PCMCIA power OFF\n");
cfg_ports (); /* Enables switch, but all in Hi-Z */
sreg = immap->im_ioport.iop_pcdat;
set_vppd(0, 1); set_vppd(1, 1);
switch(vcc) {