Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / include / asm-alpha / io.h
index 9e9de8e..f5ae98c 100644 (file)
@@ -3,7 +3,6 @@
 
 #ifdef __KERNEL__
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <asm/compiler.h>
 #include <asm/system.h>
@@ -282,6 +281,12 @@ static inline void __iomem *ioremap(unsigned long port, unsigned long size)
        return IO_CONCAT(__IO_PREFIX,ioremap) (port, size);
 }
 
+static inline void __iomem *__ioremap(unsigned long port, unsigned long size,
+                                     unsigned long flags)
+{
+       return ioremap(port, size);
+}
+
 static inline void __iomem * ioremap_nocache(unsigned long offset,
                                             unsigned long size)
 {
@@ -489,6 +494,8 @@ extern inline void writeq(u64 b, volatile void __iomem *addr)
 #define readl_relaxed(addr) __raw_readl(addr)
 #define readq_relaxed(addr) __raw_readq(addr)
 
+#define mmiowb()
+
 /*
  * String version of IO memory access ops:
  */
@@ -526,9 +533,6 @@ extern void outsl (unsigned long port, const void *src, unsigned long count);
 #define eth_io_copy_and_sum(skb,src,len,unused) \
   memcpy_fromio((skb)->data,src,len)
 
-#define isa_eth_io_copy_and_sum(skb,src,len,unused) \
-  isa_memcpy_fromio((skb)->data,src,len)
-
 static inline int
 check_signature(const volatile void __iomem *io_addr,
                const unsigned char *signature, int length)
@@ -542,97 +546,6 @@ check_signature(const volatile void __iomem *io_addr,
        return 1;
 }
 
-
-/*
- * ISA space is mapped to some machine-specific location on Alpha.
- * Call into the existing hooks to get the address translated.
- */
-
-static inline u8
-isa_readb(unsigned long offset)
-{
-       void __iomem *addr = ioremap(offset, 1);
-       u8 ret = readb(addr);
-       iounmap(addr);
-       return ret;
-}
-
-static inline u16
-isa_readw(unsigned long offset)
-{
-       void __iomem *addr = ioremap(offset, 2);
-       u16 ret = readw(addr);
-       iounmap(addr);
-       return ret;
-}
-
-static inline u32
-isa_readl(unsigned long offset)
-{
-       void __iomem *addr = ioremap(offset, 2);
-       u32 ret = readl(addr);
-       iounmap(addr);
-       return ret;
-}
-
-static inline void
-isa_writeb(u8 b, unsigned long offset)
-{
-       void __iomem *addr = ioremap(offset, 2);
-       writeb(b, addr);
-       iounmap(addr);
-}
-
-static inline void
-isa_writew(u16 w, unsigned long offset)
-{
-       void __iomem *addr = ioremap(offset, 2);
-       writew(w, addr);
-       iounmap(addr);
-}
-
-static inline void
-isa_writel(u32 l, unsigned long offset)
-{
-       void __iomem *addr = ioremap(offset, 2);
-       writel(l, addr);
-       iounmap(addr);
-}
-
-static inline void
-isa_memset_io(unsigned long offset, u8 val, long n)
-{
-       void __iomem *addr = ioremap(offset, n);
-       memset_io(addr, val, n);
-       iounmap(addr);
-}
-
-static inline void
-isa_memcpy_fromio(void *dest, unsigned long offset, long n)
-{
-       void __iomem *addr = ioremap(offset, n);
-       memcpy_fromio(dest, addr, n);
-       iounmap(addr);
-}
-
-static inline void
-isa_memcpy_toio(unsigned long offset, const void *src, long n)
-{
-       void __iomem *addr = ioremap(offset, n);
-       memcpy_toio(addr, src, n);
-       iounmap(addr);
-}
-
-static inline int
-isa_check_signature(unsigned long offset, const unsigned char *sig, long len)
-{
-       void __iomem *addr = ioremap(offset, len);
-       int ret = check_signature(addr, sig, len);
-       iounmap(addr);
-       return ret;
-}
-
-
 /*
  * The Alpha Jensen hardware for some rather strange reason puts
  * the RTC clock at 0x170 instead of 0x70. Probably due to some
@@ -658,6 +571,27 @@ isa_check_signature(unsigned long offset, const unsigned char *sig, long len)
 #define dma_cache_wback(_start,_size)          do { } while (0)
 #define dma_cache_wback_inv(_start,_size)      do { } while (0)
 
+/*
+ * Some mucking forons use if[n]def writeq to check if platform has it.
+ * It's a bloody bad idea and we probably want ARCH_HAS_WRITEQ for them
+ * to play with; for now just use cpp anti-recursion logics and make sure
+ * that damn thing is defined and expands to itself.
+ */
+
+#define writeq writeq
+#define readq readq
+
+/*
+ * Convert a physical pointer to a virtual kernel pointer for /dev/mem
+ * access
+ */
+#define xlate_dev_mem_ptr(p)   __va(p)
+
+/*
+ * Convert a virtual cached pointer to an uncached pointer
+ */
+#define xlate_dev_kmem_ptr(p)  p
+
 #endif /* __KERNEL__ */
 
 #endif /* __ALPHA_IO_H */