]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/uc100/pcmcia.c
imported Freescale specific U-Boot additions for i.MX28,... release L2.6.31_10.08.01
[karo-tx-uboot.git] / board / uc100 / pcmcia.c
index 6e4b6d6c66ff3b135dad14ab70e9f7a242814d05..ad256783ce6a56299859036906d58fa342256204 100755 (executable)
@@ -4,11 +4,11 @@
 
 #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
 
@@ -24,7 +24,7 @@ static void cfg_ports (void)
 {
        volatile immap_t        *immap;
 
-       immap = (immap_t *)CFG_IMMR;
+       immap = (immap_t *)CONFIG_SYS_IMMR;
 
        /*
        * Configure Port A for MAX1602 PC-Card Power-Interface Switch
@@ -49,10 +49,10 @@ int pcmcia_hardware_enable(int slot)
 
        udelay(10000);
 
-       immap = (immap_t *)CFG_IMMR;
-       sysp  = (sysconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_siu_conf));
-       pcmp  = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
-       cp    = (cpm8xx_t *)(&(((immap_t *)CFG_IMMR)->im_cpm));
+       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 ();
@@ -123,7 +123,7 @@ int pcmcia_hardware_enable(int slot)
 }
 
 
-#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA)
+#if defined(CONFIG_CMD_PCMCIA)
 int pcmcia_hardware_disable(int slot)
 {
        volatile immap_t        *immap;
@@ -133,8 +133,8 @@ int pcmcia_hardware_disable(int slot)
 
        debug ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
 
-       immap = (immap_t *)CFG_IMMR;
-       pcmp  = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
+       immap = (immap_t *)CONFIG_SYS_IMMR;
+       pcmp  = (pcmconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_pcmcia));
 
        /* switch VCC off */
        immap->im_ioport.iop_padat &= ~0x8000; /* power disable 3.3V */
@@ -149,7 +149,7 @@ int pcmcia_hardware_disable(int slot)
 
        return (0);
 }
-#endif /* CFG_CMD_PCMCIA */
+#endif
 
 
 int pcmcia_voltage_set(int slot, int vcc, int vpp)
@@ -163,8 +163,8 @@ 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 *)CFG_IMMR;
-       pcmp  = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
+       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