]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: asm/io.h: unify ioremap prototypes
authorJeremy Fitzhardinge <jeremy@goop.org>
Fri, 6 Feb 2009 21:29:52 +0000 (13:29 -0800)
committerJeremy Fitzhardinge <jeremy@goop.org>
Fri, 6 Feb 2009 21:29:52 +0000 (13:29 -0800)
Impact: unify identical code

asm/io_32.h and _64.h have identical prototypes for the ioremap family
of functions.  The 32-bit header had a more descriptive comment.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
arch/x86/include/asm/io.h
arch/x86/include/asm/io_32.h
arch/x86/include/asm/io_64.h

index 919e3b19f3caf1c33d5fcc383bec1f2e7331d131..f150b1ecf920ec15cc0caab1fa18fa3f63bcc33a 100644 (file)
@@ -138,6 +138,37 @@ static inline void *phys_to_virt(phys_addr_t address)
 #define virt_to_bus virt_to_phys
 #define bus_to_virt phys_to_virt
 
+/**
+ * ioremap     -   map bus memory into CPU space
+ * @offset:    bus address of the memory
+ * @size:      size of the resource to map
+ *
+ * ioremap performs a platform specific sequence of operations to
+ * make bus memory CPU accessible via the readb/readw/readl/writeb/
+ * writew/writel functions and the other mmio helpers. The returned
+ * address is not guaranteed to be usable directly as a virtual
+ * address.
+ *
+ * If the area you are trying to map is a PCI BAR you should have a
+ * look at pci_iomap().
+ */
+extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
+extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
+extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
+                               unsigned long prot_val);
+
+/*
+ * The default ioremap() behavior is non-cached:
+ */
+static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
+{
+       return ioremap_nocache(offset, size);
+}
+
+extern void iounmap(volatile void __iomem *addr);
+
+extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
+
 
 #ifdef CONFIG_X86_32
 # include "io_32.h"
index 2b687cb86093f9e4190bb3ce7c28453c02d4fb7c..2fbe7dd26bb87f16717224887d6feed705ffc7c9 100644 (file)
  */
 #define xlate_dev_kmem_ptr(p)  p
 
-/**
- * ioremap     -   map bus memory into CPU space
- * @offset:    bus address of the memory
- * @size:      size of the resource to map
- *
- * ioremap performs a platform specific sequence of operations to
- * make bus memory CPU accessible via the readb/readw/readl/writeb/
- * writew/writel functions and the other mmio helpers. The returned
- * address is not guaranteed to be usable directly as a virtual
- * address.
- *
- * If the area you are trying to map is a PCI BAR you should have a
- * look at pci_iomap().
- */
-extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
-extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
-extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
-                               unsigned long prot_val);
-
-/*
- * The default ioremap() behavior is non-cached:
- */
-static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
-{
-       return ioremap_nocache(offset, size);
-}
-
-extern void iounmap(volatile void __iomem *addr);
-
 static inline void
 memset_io(volatile void __iomem *addr, unsigned char val, int count)
 {
index e71b55508775b7704a825d911c1ebff2eecb27b1..0424c07246f4619ee0603634957e7bd940b98755 100644 (file)
@@ -144,28 +144,6 @@ __OUTS(l)
 
 #include <asm-generic/iomap.h>
 
-/*
- * This one maps high address device memory and turns off caching for that area.
- * it's useful if some control registers are in such an area and write combining
- * or read caching is not desirable:
- */
-extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
-extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
-extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
-                               unsigned long prot_val);
-
-/*
- * The default ioremap() behavior is non-cached:
- */
-static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
-{
-       return ioremap_nocache(offset, size);
-}
-
-extern void iounmap(volatile void __iomem *addr);
-
-extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
-
 void __memcpy_fromio(void *, unsigned long, unsigned);
 void __memcpy_toio(unsigned long, const void *, unsigned);