]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - common/cmd_pcmcia.c
* Patch by Rune Torgersen, 27 Feb 2004:
[karo-tx-uboot.git] / common / cmd_pcmcia.c
index 53d22271bb195179b657fef6393965a30a048dca..cb4e4c6223bd77ac92d39f920a332204369a3e30 100644 (file)
@@ -160,8 +160,8 @@ int pcmcia_on (void)
 }
 #else
 
-#ifdef CONFIG_BMS2003
-# define  BMS2003_FRAM_TIMING  (PCMCIA_SHT(2) | PCMCIA_SST(2) | PCMCIA_SL(4))
+#ifdef CONFIG_HMI10
+# define  HMI10_FRAM_TIMING    (PCMCIA_SHT(2) | PCMCIA_SST(2) | PCMCIA_SL(4))
 #endif
 #if defined(CONFIG_LWMON) || defined(CONFIG_NSCU)
 # define  CFG_PCMCIA_TIMING    (PCMCIA_SHT(9) | PCMCIA_SST(3) | PCMCIA_SL(12))
@@ -200,14 +200,14 @@ int pcmcia_on (void)
                switch (i) {
 #ifdef CONFIG_IDE_8xx_PCCARD
                case 4:
-#ifdef CONFIG_BMS2003
+#ifdef CONFIG_HMI10
                    {   /* map FRAM area */
                        win->or = (     PCMCIA_BSIZE_256K
                                |       PCMCIA_PPS_8
                                |       PCMCIA_PRS_ATTR
                                |       slotbit
                                |       PCMCIA_PV
-                               |       BMS2003_FRAM_TIMING );
+                               |       HMI10_FRAM_TIMING );
                        break;
                    }
 #endif
@@ -241,7 +241,7 @@ int pcmcia_on (void)
                        break;
                    }
 #endif /* CONFIG_IDE_8xx_PCCARD */
-#ifdef CONFIG_BMS2003
+#ifdef CONFIG_HMI10
                case 3: {       /* map I/O window for 4xUART data/ctrl */
                        win->br += 0x40000;
                        win->or = (     PCMCIA_BSIZE_256K
@@ -252,7 +252,7 @@ int pcmcia_on (void)
                                |       CFG_PCMCIA_TIMING );
                        break;
                    }
-#endif /* CONFIG_BMS2003 */
+#endif /* CONFIG_HMI10 */
                default:        /* set to not valid */
                        win->or = 0;
                        break;
@@ -636,7 +636,7 @@ static int hardware_enable(int slot)
        PCMCIA_PGCRX(slot) = reg;
        udelay(500);
 
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
 #ifndef CONFIG_NSCU
        /*
         * Configure Port C pins for
@@ -648,7 +648,7 @@ static int hardware_enable(int slot)
 
        immap->im_ioport.iop_pcdat &= ~(0x0002 | 0x0004);
 #endif
-#else  /* CONFIG_BMS2003 */
+#else  /* CONFIG_HMI10 */
        /*
         * Configure Port B  pins for
         * 5 Volts Enable and 3 Volts enable
@@ -657,7 +657,7 @@ static int hardware_enable(int slot)
 
        /* remove all power */
        immap->im_cpm.cp_pbdat |= 0x00000300;
-#endif /* CONFIG_BMS2003 */
+#endif /* CONFIG_HMI10 */
 
        /*
         * Make sure there is a card in the slot, then configure the interface.
@@ -666,11 +666,11 @@ static int hardware_enable(int slot)
        debug ("[%d] %s: PIPR(%p)=0x%x\n",
                __LINE__,__FUNCTION__,
                &(pcmp->pcmc_pipr),pcmp->pcmc_pipr);
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
        if (pcmp->pcmc_pipr & (0x18000000 >> (slot << 4))) {
 #else
        if (pcmp->pcmc_pipr & (0x10000000 >> (slot << 4))) {
-#endif /* CONFIG_BMS2003 */
+#endif /* CONFIG_HMI10 */
                printf ("   No Card found\n");
                return (1);
        }
@@ -686,25 +686,25 @@ static int hardware_enable(int slot)
                (reg&PCMCIA_VS2(slot))?"n":"ff");
 #ifndef CONFIG_NSCU
        if ((reg & mask) == mask) {
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
                immap->im_ioport.iop_pcdat |= 0x0004;
 #else
                immap->im_cpm.cp_pbdat &= ~(0x0000100);
-#endif /* CONFIG_BMS2003 */
+#endif /* CONFIG_HMI10 */
                puts (" 5.0V card found: ");
        } else {
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
                immap->im_ioport.iop_pcdat |= 0x0002;
 #else
                immap->im_cpm.cp_pbdat &= ~(0x0000200);
-#endif /* CONFIG_BMS2003 */
+#endif /* CONFIG_HMI10 */
                puts (" 3.3V card found: ");
        }
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
        immap->im_ioport.iop_pcdir |= (0x0002 | 0x0004);
 #else
        immap->im_cpm.cp_pbdir |= 0x00000300;
-#endif /* CONFIG_BMS2003 */
+#endif /* CONFIG_HMI10 */
 #else
        if ((reg & mask) == mask) {
                puts (" 5.0V card found: ");
@@ -749,14 +749,14 @@ static int hardware_disable(int slot)
        immap = (immap_t *)CFG_IMMR;
        pcmp = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
 
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
 #ifndef CONFIG_NSCU
        /* remove all power */
        immap->im_ioport.iop_pcdat &= ~(0x0002 | 0x0004);
 #endif
-#else  /* CONFIG_BMS2003 */
+#else  /* CONFIG_HMI10 */
        immap->im_cpm.cp_pbdat |= 0x00000300;
-#endif /* CONFIG_BMS2003 */
+#endif /* CONFIG_HMI10 */
 
        debug ("Disable PCMCIA buffers and assert RESET\n");
        reg  = 0;
@@ -806,7 +806,7 @@ static int voltage_set(int slot, int vcc, int vpp)
        PCMCIA_PGCRX(slot) = reg;
        udelay(500);
 
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
        /*
         * Configure Port C pins for
         * 5 Volts Enable and 3 Volts enable,
@@ -824,7 +824,7 @@ static int voltage_set(int slot, int vcc, int vpp)
        case 50: reg |= 0x0004; break;
        default:                goto done;
        }
-#else  /* CONFIG_BMS2003 */
+#else  /* CONFIG_HMI10 */
        /*
         * Configure Port B pins for
         * 5 Volts Enable and 3 Volts enable,
@@ -843,7 +843,7 @@ static int voltage_set(int slot, int vcc, int vpp)
                case 50: reg |= 0x00000100;     break;
                default:                        goto done;
 }
-#endif /* CONFIG_BMS2003 */
+#endif /* CONFIG_HMI10 */
 
        /* Checking supported voltages */
 
@@ -851,21 +851,21 @@ static int voltage_set(int slot, int vcc, int vpp)
                pcmp->pcmc_pipr,
                (pcmp->pcmc_pipr & 0x00008000) ? "only 5 V" : "can do 3.3V");
 
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
        immap->im_ioport.iop_pcdat |= reg;
        immap->im_ioport.iop_pcdir |= (0x0002 | 0x0004);
 #else
        immap->im_cpm.cp_pbdat &= !reg;
        immap->im_cpm.cp_pbdir |= 0x00000300;
-#endif /* CONFIG_BMS2003 */
+#endif /* CONFIG_HMI10 */
        if (reg) {
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
                debug ("PCMCIA powered at %sV\n",
                        (reg&0x0004) ? "5.0" : "3.3");
 #else
                debug ("PCMCIA powered at %sV\n",
                        (reg&0x00000200) ? "5.0" : "3.3");
-#endif /* CONFIG_BMS2003 */
+#endif /* CONFIG_HMI10 */
        } else {
                debug ("PCMCIA powered down\n");
        }
@@ -1850,11 +1850,11 @@ static int hardware_enable (int slot)
        debug ("[%d] %s: PIPR(%p)=0x%x\n",
                __LINE__,__FUNCTION__,
                &(pcmp->pcmc_pipr),pcmp->pcmc_pipr);
-#ifndef CONFIG_BMS2003
+#ifndef CONFIG_HMI10
        if (pcmp->pcmc_pipr & (0x18000000 >> (slot << 4))) {
 #else
        if (pcmp->pcmc_pipr & (0x10000000 >> (slot << 4))) {
-#endif /* CONFIG_BMS2003 */
+#endif /* CONFIG_HMI10 */
                printf ("   No Card found\n");
                return (1);
        }