summaryrefslogtreecommitdiff
path: root/board/manroland/uc100
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-11-04 15:55:27 +0000
committerWolfgang Denk <wd@denx.de>2011-11-07 22:12:41 +0100
commit561d01a5ee5d148de87fe3c7adbb28b4cc522db2 (patch)
tree5d1e36346932ec01ce92ebf0db770af8442321b0 /board/manroland/uc100
parent700a3748a68db2cae485ec111c07d5b75b8f2c5e (diff)
downloadu-boot-imx-561d01a5ee5d148de87fe3c7adbb28b4cc522db2.zip
u-boot-imx-561d01a5ee5d148de87fe3c7adbb28b4cc522db2.tar.gz
u-boot-imx-561d01a5ee5d148de87fe3c7adbb28b4cc522db2.tar.bz2
board/manroland/uc100/pcmcia.c: Fix GCC 4.6 build warnings
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 <wd@denx.de>
Diffstat (limited to 'board/manroland/uc100')
-rw-r--r--board/manroland/uc100/pcmcia.c50
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 */