Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
[powerpc.git] / include / asm-arm / arch-ixp4xx / io.h
index 688f7f9..c72f9d7 100644 (file)
@@ -38,7 +38,7 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
  * 2) If > 64MB of memory space is required, the IXP4xx can be configured
  *    to use indirect registers to access PCI (as we do below for I/O
  *    transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff)
- *    of memory on the bus. The disadvantadge of this is that every 
+ *    of memory on the bus. The disadvantage of this is that every 
  *    PCI access requires three local register accesses plus a spinlock,
  *    but in some cases the performance hit is acceptable. In addition,
  *    you cannot mmap() PCI devices in this case.
@@ -59,11 +59,10 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
  * fallback to the default.
  */
 static inline void __iomem *
-__ixp4xx_ioremap(unsigned long addr, size_t size, unsigned long flags, unsigned long align)
+__ixp4xx_ioremap(unsigned long addr, size_t size, unsigned int mtype)
 {
-       extern void __iomem * __ioremap(unsigned long, size_t, unsigned long, unsigned long);
-       if((addr < 0x48000000) || (addr > 0x4fffffff))
-               return __ioremap(addr, size, flags, align);
+       if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff))
+               return __arm_ioremap(addr, size, mtype);
 
        return (void *)addr;
 }
@@ -71,13 +70,11 @@ __ixp4xx_ioremap(unsigned long addr, size_t size, unsigned long flags, unsigned
 static inline void
 __ixp4xx_iounmap(void __iomem *addr)
 {
-       extern void __iounmap(void __iomem *addr);
-
        if ((u32)addr >= VMALLOC_START)
                __iounmap(addr);
 }
 
-#define __arch_ioremap(a, s, f, x)     __ixp4xx_ioremap(a, s, f, x)
+#define __arch_ioremap(a, s, f)                __ixp4xx_ioremap(a, s, f)
 #define        __arch_iounmap(a)               __ixp4xx_iounmap(a)
 
 #define        writeb(v, p)                    __ixp4xx_writeb(v, p)
@@ -241,27 +238,13 @@ __ixp4xx_readsl(const volatile void __iomem *bus_addr, u32 *vaddr, u32 count)
 #define memcpy_fromio(a,c,l)           _memcpy_fromio((a),(c),(l))
 #define memcpy_toio(c,a,l)             _memcpy_toio((c),(a),(l))
 
-#define eth_io_copy_and_sum(s,c,l,b) \
-                               eth_copy_and_sum((s),__mem_pci(c),(l),(b))
+#endif
 
-static inline int
-check_signature(const unsigned char __iomem *bus_addr, const unsigned char *signature,
-               int length)
-{
-       int retval = 0;
-       do {
-               if (readb(bus_addr) != *signature)
-                       goto out;
-               bus_addr++;
-               signature++;
-               length--;
-       } while (length);
-       retval = 1;
-out:
-       return retval;
-}
+#ifndef CONFIG_PCI
 
-#endif
+#define        __io(v)         v
+
+#else
 
 /*
  * IXP4xx does not have a transparent cpu -> PCI I/O translation
@@ -581,6 +564,7 @@ __ixp4xx_iowrite32_rep(void __iomem *addr, const void *vaddr, u32 count)
 
 #define        ioport_map(port, nr)            ((void __iomem*)(port + PIO_OFFSET))
 #define        ioport_unmap(addr)
+#endif // !CONFIG_PCI
 
 #endif //  __ASM_ARM_ARCH_IO_H