sunxi: use setbits_le32 to enable the DMA clock
[platform/kernel/u-boot.git] / board / fads / pcmcia.c
index 978c16b..996f032 100644 (file)
@@ -4,21 +4,17 @@
 
 #undef CONFIG_PCMCIA
 
-#if    (CONFIG_COMMANDS & CFG_CMD_PCMCIA)
+#if defined(CONFIG_CMD_PCMCIA)
 #define        CONFIG_PCMCIA
 #endif
 
-#if    (CONFIG_COMMANDS & CFG_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD)
+#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD)
 #define        CONFIG_PCMCIA
 #endif
 
 #ifdef CONFIG_PCMCIA
 
-#ifdef CONFIG_ADS
-#define        PCMCIA_BOARD_MSG "ADS"
-#else
 #define        PCMCIA_BOARD_MSG "FADS"
-#endif
 
 int pcmcia_voltage_set(int slot, int vcc, int vpp)
 {
@@ -33,9 +29,6 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp)
 
        switch(vcc) {
                case 0: reg = 0; break;
-#ifdef CONFIG_ADS
-       case 50: reg = BCSR1_PCCVCCON; break;
-#endif
 #ifdef CONFIG_FADS
        case 33: reg = BCSR1_PCCVCC0 | BCSR1_PCCVCC1; break;
        case 50: reg = BCSR1_PCCVCC1; break;
@@ -45,9 +38,6 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp)
 
        /* first, turn off all power */
 
-#ifdef CONFIG_ADS
-       *((uint *)BCSR1) |= BCSR1_PCCVCCON;
-#endif
 #ifdef CONFIG_FADS
        *((uint *)BCSR1) &= ~(BCSR1_PCCVCC0 | BCSR1_PCCVCC1);
 #endif
@@ -55,14 +45,11 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp)
 
        /* enable new powersettings */
 
-#ifdef CONFIG_ADS
-       *((uint *)BCSR1) &= ~reg;
-#endif
 #ifdef CONFIG_FADS
        *((uint *)BCSR1) |= reg;
 #endif
 
-       *((uint *)BCSR1) |= reg << 20;
+       *((uint *)BCSR1) |= reg << 20;
 
        return 0;
 }
@@ -73,12 +60,12 @@ int pcmcia_hardware_enable(int slot)
        return 0;
 }
 
-#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA)
+#if defined(CONFIG_CMD_PCMCIA)
 int pcmcia_hardware_disable(int slot)
 {
        *((uint *)BCSR1) &= ~BCSR1_PCCEN;
        return 0;
 }
-#endif /* CFG_CMD_PCMCIA */
+#endif
 
 #endif /* CONFIG_PCMCIA */