return (void *)(port + NONCACHE_OFFSET);
 }
 
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
+#if defined(CONFIG_IDE)
 static inline void *__port2addr_ata(unsigned long port)
 {
        static int      dummy_reg;
 
        switch (port) {
+         /* IDE0 CF */
        case 0x1f0:     return (void *)0xb4002000;
        case 0x1f1:     return (void *)0xb4012800;
        case 0x1f2:     return (void *)0xb4012002;
        case 0x1f6:     return (void *)0xb4012006;
        case 0x1f7:     return (void *)0xb4012806;
        case 0x3f6:     return (void *)0xb401200e;
+         /* IDE1 IDE */
+       case 0x170:     return (void *)0xb4810000;  /* Data 16bit */
+       case 0x171:     return (void *)0xb4810002;  /* Features / Error */
+       case 0x172:     return (void *)0xb4810004;  /* Sector count */
+       case 0x173:     return (void *)0xb4810006;  /* Sector number */
+       case 0x174:     return (void *)0xb4810008;  /* Cylinder low */
+       case 0x175:     return (void *)0xb481000a;  /* Cylinder high */
+       case 0x176:     return (void *)0xb481000c;  /* Device head */
+       case 0x177:     return (void *)0xb481000e;  /* Command     */
+       case 0x376:     return (void *)0xb480800c;  /* Device control / Alt status */
+
        default:        return (void *)&dummy_reg;
        }
 }
 {
        if (port >= LAN_IOSTART && port < LAN_IOEND)
                return _ne_inb(PORT2ADDR_NE(port));
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
-       else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+#if defined(CONFIG_IDE)
+       else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
+                 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
                return *(volatile unsigned char *)__port2addr_ata(port);
        }
 #endif
 {
        if (port >= LAN_IOSTART && port < LAN_IOEND)
                return _ne_inw(PORT2ADDR_NE(port));
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
-       else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+#if defined(CONFIG_IDE)
+       else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
+                 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
                return *(volatile unsigned short *)__port2addr_ata(port);
        }
 #endif
        if (port >= LAN_IOSTART && port < LAN_IOEND)
                _ne_outb(b, PORT2ADDR_NE(port));
        else
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
-       if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+#if defined(CONFIG_IDE)
+       if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
+                 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
                *(volatile unsigned char *)__port2addr_ata(port) = b;
        } else
 #endif
        if (port >= LAN_IOSTART && port < LAN_IOEND)
                _ne_outw(w, PORT2ADDR_NE(port));
        else
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
-       if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+#if defined(CONFIG_IDE)
+       if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
+                 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
                *(volatile unsigned short *)__port2addr_ata(port) = w;
        } else
 #endif
 {
        if (port >= LAN_IOSTART && port < LAN_IOEND)
                _ne_insb(PORT2ADDR_NE(port), addr, count);
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
-       else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+#if defined(CONFIG_IDE)
+       else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
+                 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
                unsigned char *buf = addr;
                unsigned char *portp = __port2addr_ata(port);
                while (count--)
                pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short),
                                count, 1);
 #endif
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
-       } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+#if defined(CONFIG_IDE)
+       } else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
+                 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
                portp = __port2addr_ata(port);
                while (count--)
                        *buf++ = *(volatile unsigned short *)portp;
                portp = PORT2ADDR_NE(port);
                while (count--)
                        _ne_outb(*buf++, portp);
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
-       } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+#if defined(CONFIG_IDE)
+       } else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
+                 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
                portp = __port2addr_ata(port);
                while (count--)
                        *(volatile unsigned char *)portp = *buf++;
                portp = PORT2ADDR_NE(port);
                while (count--)
                        *(volatile unsigned short *)portp = *buf++;
-#if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC)
-       } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+#if defined(CONFIG_IDE)
+       } else if ( ((port >= 0x170 && port <=0x177) || port == 0x376) ||
+                 ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) ){
                portp = __port2addr_ata(port);
                while (count--)
                        *(volatile unsigned short *)portp = *buf++;
 
        disable_mappi3_irq(M32R_IRQ_INT1);
 #endif /* CONFIG_USB */
 
-       /* ICUCR40: CFC IREQ */
+       /* CFC IREQ */
        irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED;
        irq_desc[PLD_IRQ_CFIREQ].handler = &mappi3_irq_type;
        irq_desc[PLD_IRQ_CFIREQ].action = 0;
        disable_mappi3_irq(PLD_IRQ_CFIREQ);
 
 #if defined(CONFIG_M32R_CFC)
-       /* ICUCR41: CFC Insert */
+       /* ICUCR41: CFC Insert & eject */
        irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED;
        irq_desc[PLD_IRQ_CFC_INSERT].handler = &mappi3_irq_type;
        irq_desc[PLD_IRQ_CFC_INSERT].action = 0;
        icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00;
        disable_mappi3_irq(PLD_IRQ_CFC_INSERT);
 
-       /* ICUCR42: CFC Eject */
-       irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED;
-       irq_desc[PLD_IRQ_CFC_EJECT].handler = &mappi3_irq_type;
-       irq_desc[PLD_IRQ_CFC_EJECT].action = 0;
-       irq_desc[PLD_IRQ_CFC_EJECT].depth = 1;  /* disable nested irq */
-       icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
-       disable_mappi3_irq(PLD_IRQ_CFC_EJECT);
 #endif /* CONFIG_M32R_CFC */
+
+       /* IDE IREQ */
+       irq_desc[PLD_IRQ_IDEIREQ].status = IRQ_DISABLED;
+       irq_desc[PLD_IRQ_IDEIREQ].handler = &mappi3_irq_type;
+       irq_desc[PLD_IRQ_IDEIREQ].action = 0;
+       irq_desc[PLD_IRQ_IDEIREQ].depth = 1;    /* disable nested irq */
+       icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
+       disable_mappi3_irq(PLD_IRQ_IDEIREQ);
+
 }
 
 #if defined(CONFIG_SMC91X)