]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: io: ecard: remove ioaddr() from ecard.c
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 7 Jul 2011 10:07:36 +0000 (11:07 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 17 Aug 2011 07:44:16 +0000 (08:44 +0100)
Remove ioaddr() usage from ecard.c, updating (and renaming) the
constants in RiscPC's hardware.h to contain the proper translation.
As this gets rid of the last ioaddr() usage, kill that too.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/ecard.c
arch/arm/mach-rpc/include/mach/hardware.h
arch/arm/mach-rpc/include/mach/io.h

index 920f1a371a22af6d3b8611fe0a6b1f4e16ee98e9..3e84f66de8f793933db11d0dafece2e9142a4995 100644 (file)
@@ -674,44 +674,37 @@ static int __init ecard_probeirqhw(void)
 #define ecard_probeirqhw() (0)
 #endif
 
-#ifndef IO_EC_MEMC8_BASE
-#define IO_EC_MEMC8_BASE 0
-#endif
-
 static void __iomem *__ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed)
 {
-       unsigned long address = 0;
+       void __iomem *address = NULL;
        int slot = ec->slot_no;
 
        if (ec->slot_no == 8)
-               return (void __iomem *)ioaddr(IO_EC_MEMC8_BASE);
+               return ECARD_MEMC8_BASE;
 
        ectcr &= ~(1 << slot);
 
        switch (type) {
        case ECARD_MEMC:
                if (slot < 4)
-                       address = IO_EC_MEMC_BASE + (slot << 12);
+                       address = ECARD_MEMC_BASE + (slot << 14);
                break;
 
        case ECARD_IOC:
                if (slot < 4)
-                       address = IO_EC_IOC_BASE + (slot << 12);
-#ifdef IO_EC_IOC4_BASE
+                       address = ECARD_IOC_BASE + (slot << 14);
                else
-                       address = IO_EC_IOC4_BASE + ((slot - 4) << 12);
-#endif
+                       address = ECARD_IOC4_BASE + ((slot - 4) << 14);
                if (address)
-                       address +=  speed << 17;
+                       address += speed << 19;
                break;
 
-#ifdef IO_EC_EASI_BASE
        case ECARD_EASI:
-               address = IO_EC_EASI_BASE + (slot << 22);
+               address = ECARD_EASI_BASE + (slot << 24);
                if (speed == ECARD_FAST)
                        ectcr |= 1 << slot;
                break;
-#endif
+
        default:
                break;
        }
@@ -719,7 +712,7 @@ static void __iomem *__ecard_address(ecard_t *ec, card_type_t type, card_speed_t
 #ifdef IOMD_ECTCR
        iomd_writeb(ectcr, IOMD_ECTCR);
 #endif
-       return (void __iomem *)(address ? ioaddr(address) : NULL);
+       return address;
 }
 
 static int ecard_prints(struct seq_file *m, ecard_t *ec)
@@ -1049,10 +1042,8 @@ ecard_probe(int slot, card_type_t type)
                set_irq_flags(ec->irq, IRQF_VALID);
        }
 
-#ifdef IO_EC_MEMC8_BASE
        if (slot == 8)
                ec->irq = 11;
-#endif
 #ifdef CONFIG_ARCH_RPC
        /* On RiscPC, only first two slots have DMA capability */
        if (slot < 2)
@@ -1098,9 +1089,7 @@ static int __init ecard_init(void)
                        ecard_probe(slot, ECARD_IOC);
        }
 
-#ifdef IO_EC_MEMC8_BASE
        ecard_probe(8, ECARD_IOC);
-#endif
 
        irqhw = ecard_probeirqhw();
 
index 822b810215d7073cd272b61485b542ab7e3a99a6..41777660d9fe20a22527b7ee2093d34fe4d1001f 100644 (file)
 /*
  * IO Addresses
  */
+#define ECARD_EASI_BASE                (IO_BASE + 0x05000000)
 #define VIDC_BASE              (IO_BASE + 0x00400000)
 #define EXPMASK_BASE           (IO_BASE + 0x00360000)
+#define ECARD_IOC4_BASE                (IO_BASE + 0x00270000)
+#define ECARD_IOC_BASE         (IO_BASE + 0x00240000)
 #define IOMD_BASE              (IO_BASE + 0x00200000)
 #define IOC_BASE               (IO_BASE + 0x00200000)
+#define ECARD_MEMC8_BASE       (IO_BASE + 0x0002b000)
 #define FLOPPYDMA_BASE         (IO_BASE + 0x0002a000)
 #define PCIO_BASE              (IO_BASE + 0x00010000)
+#define ECARD_MEMC_BASE                (IO_BASE + 0x00000000)
 
 #define vidc_writel(val)       __raw_writel(val, VIDC_BASE)
 
-#define IO_EC_EASI_BASE                0x81400000
-#define IO_EC_IOC4_BASE                0x8009c000
-#define IO_EC_IOC_BASE         0x80090000
-#define IO_EC_MEMC8_BASE       0x8000ac00
-#define IO_EC_MEMC_BASE                0x80000000
-
 #define NETSLOT_BASE           0x0302b000
 #define NETSLOT_SIZE           0x00001000
 
index 20da7f486e5167627378d3a9442db8fff0a7d370..dd706ff25940174d92f0fd44e04c9b940ddcdcbf 100644 (file)
@@ -196,9 +196,6 @@ DECLARE_IO(int,l,"")
 #define outw(v,p)      (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
 #define outl(v,p)      (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
 
-/* the following macro is deprecated */
-#define ioaddr(port)   ((unsigned long)__ioaddr((port)))
-
 #define insb(p,d,l)    __raw_readsb(__ioaddr(p),d,l)
 #define insw(p,d,l)    __raw_readsw(__ioaddr(p),d,l)