summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-05-01 02:13:43 +0200
committerWolfgang Denk <wd@denx.de>2008-05-03 20:53:12 +0200
commit6d12e697de794d700767f22f950e3026ccf4daf6 (patch)
treebdc8ad8d7435790beec9f3cb079dccb34ec9c1dc /drivers/pcmcia
parent4d77f5102dfeaa36cd58d9a9f083bd2cc491526f (diff)
downloadu-boot-6d12e697de794d700767f22f950e3026ccf4daf6.tar.gz
u-boot-6d12e697de794d700767f22f950e3026ccf4daf6.tar.xz
u-boot-6d12e697de794d700767f22f950e3026ccf4daf6.zip
pxa: fix pcmcia operation on 'i' may be undefined
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/pxa_pcmcia.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pcmcia/pxa_pcmcia.c b/drivers/pcmcia/pxa_pcmcia.c
index 6020e46283..65427efdbd 100644
--- a/drivers/pcmcia/pxa_pcmcia.c
+++ b/drivers/pcmcia/pxa_pcmcia.c
@@ -35,8 +35,10 @@ int pcmcia_on (void)
debug ("%s\n", __FUNCTION__);
i = 0;
- while (reg_arr[i])
- *((volatile unsigned int *) reg_arr[i++]) |= reg_arr[i++];
+ while (reg_arr[i]) {
+ (*(volatile unsigned int *) reg_arr[i]) |= reg_arr[i + 1];
+ i += 2;
+ }
udelay (1000);
debug ("%s: programmed mem controller \n", __FUNCTION__);
@@ -44,7 +46,7 @@ int pcmcia_on (void)
#ifdef CONFIG_EXADRON1
/*define useful BCR masks */
-#define BCR_CF_INIT_VAL 0x00007230
+#define BCR_CF_INIT_VAL 0x00007230
#define BCR_CF_PWRON_BUSOFF_RESETOFF_VAL 0x00007231
#define BCR_CF_PWRON_BUSOFF_RESETON_VAL 0x00007233
#define BCR_CF_PWRON_BUSON_RESETON_VAL 0x00007213