X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fmbx8xx%2Fpcmcia.c;h=497e260a0a4f66510d02b9ececc22da997561bfa;hb=a53f4a29ac62a2e83d35a4a7b6d6969cf95a5902;hp=132a68806d89e39be2a5269faadcbf8f5f874354;hpb=b5338b23a15779204cccb0706c06087b86c22f07;p=u-boot diff --git a/board/mbx8xx/pcmcia.c b/board/mbx8xx/pcmcia.c index 132a68806d..497e260a0a 100644 --- a/board/mbx8xx/pcmcia.c +++ b/board/mbx8xx/pcmcia.c @@ -6,11 +6,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 @@ -77,10 +77,7 @@ int pcmcia_voltage_set (int slot, int vcc, int vpp) 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; debug ("hardware_enable: " PCMCIA_BOARD_MSG " Slot %c\n", @@ -88,10 +85,7 @@ 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)); + pcmp = (pcmconf8xx_t *) (&(((immap_t *) CONFIG_SYS_IMMR)->im_pcmcia)); /* clear interrupt state, and disable interrupts */ pcmp->pcmc_pscr = PCMCIA_MASK (_slot_); @@ -117,11 +111,7 @@ int pcmcia_hardware_enable (int slot) debug ("[%d] %s: PIPR(%p)=0x%x\n", __LINE__,__FUNCTION__, &(pcmp->pcmc_pipr),pcmp->pcmc_pipr); -#ifndef CONFIG_HMI10 - if (pcmp->pcmc_pipr & (0x18000000 >> (slot << 4))) { -#else if (pcmp->pcmc_pipr & (0x10000000 >> (slot << 4))) { -#endif /* CONFIG_HMI10 */ printf (" No Card found\n"); return (1); } @@ -156,11 +146,11 @@ 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) { return 0; /* No hardware to disable */ } -#endif /* CFG_CMD_PCMCIA */ +#endif #endif /* CONFIG_PCMCIA */