aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2009-02-06 16:29:52 -0500
committerJeremy Fitzhardinge <jeremy@goop.org>2009-02-06 16:29:52 -0500
commit133822c5c038b265ddb6545cda3a4c88815c7d3d (patch)
treedaa2e77d813a26e5199285dc60dabd3baeeeb0ae /arch
parent976e8f677e42757e5586ea04a9ac8bb8ddaa037e (diff)
x86: asm/io.h: unify ioremap prototypes
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/io.h31
-rw-r--r--arch/x86/include/asm/io_32.h29
-rw-r--r--arch/x86/include/asm/io_64.h22
3 files changed, 31 insertions, 51 deletions
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 919e3b19f3ca..f150b1ecf920 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -138,6 +138,37 @@ static inline void *phys_to_virt(phys_addr_t address)
138#define virt_to_bus virt_to_phys 138#define virt_to_bus virt_to_phys
139#define bus_to_virt phys_to_virt 139#define bus_to_virt phys_to_virt
140 140
141/**
142 * ioremap - map bus memory into CPU space
143 * @offset: bus address of the memory
144 * @size: size of the resource to map
145 *
146 * ioremap performs a platform specific sequence of operations to
147 * make bus memory CPU accessible via the readb/readw/readl/writeb/
148 * writew/writel functions and the other mmio helpers. The returned
149 * address is not guaranteed to be usable directly as a virtual
150 * address.
151 *
152 * If the area you are trying to map is a PCI BAR you should have a
153 * look at pci_iomap().
154 */
155extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
156extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
157extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
158 unsigned long prot_val);
159
160/*
161 * The default ioremap() behavior is non-cached:
162 */
163static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
164{
165 return ioremap_nocache(offset, size);
166}
167
168extern void iounmap(volatile void __iomem *addr);
169
170extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
171
141 172
142#ifdef CONFIG_X86_32 173#ifdef CONFIG_X86_32
143# include "io_32.h" 174# include "io_32.h"
diff --git a/arch/x86/include/asm/io_32.h b/arch/x86/include/asm/io_32.h
index 2b687cb86093..2fbe7dd26bb8 100644
--- a/arch/x86/include/asm/io_32.h
+++ b/arch/x86/include/asm/io_32.h
@@ -53,35 +53,6 @@
53 */ 53 */
54#define xlate_dev_kmem_ptr(p) p 54#define xlate_dev_kmem_ptr(p) p
55 55
56/**
57 * ioremap - map bus memory into CPU space
58 * @offset: bus address of the memory
59 * @size: size of the resource to map
60 *
61 * ioremap performs a platform specific sequence of operations to
62 * make bus memory CPU accessible via the readb/readw/readl/writeb/
63 * writew/writel functions and the other mmio helpers. The returned
64 * address is not guaranteed to be usable directly as a virtual
65 * address.
66 *
67 * If the area you are trying to map is a PCI BAR you should have a
68 * look at pci_iomap().
69 */
70extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
71extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
72extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
73 unsigned long prot_val);
74
75/*
76 * The default ioremap() behavior is non-cached:
77 */
78static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
79{
80 return ioremap_nocache(offset, size);
81}
82
83extern void iounmap(volatile void __iomem *addr);
84
85static inline void 56static inline void
86memset_io(volatile void __iomem *addr, unsigned char val, int count) 57memset_io(volatile void __iomem *addr, unsigned char val, int count)
87{ 58{
diff --git a/arch/x86/include/asm/io_64.h b/arch/x86/include/asm/io_64.h
index e71b55508775..0424c07246f4 100644
--- a/arch/x86/include/asm/io_64.h
+++ b/arch/x86/include/asm/io_64.h
@@ -144,28 +144,6 @@ __OUTS(l)
144 144
145#include <asm-generic/iomap.h> 145#include <asm-generic/iomap.h>
146 146
147/*
148 * This one maps high address device memory and turns off caching for that area.
149 * it's useful if some control registers are in such an area and write combining
150 * or read caching is not desirable:
151 */
152extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
153extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
154extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
155 unsigned long prot_val);
156
157/*
158 * The default ioremap() behavior is non-cached:
159 */
160static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
161{
162 return ioremap_nocache(offset, size);
163}
164
165extern void iounmap(volatile void __iomem *addr);
166
167extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
168
169void __memcpy_fromio(void *, unsigned long, unsigned); 147void __memcpy_fromio(void *, unsigned long, unsigned);
170void __memcpy_toio(unsigned long, const void *, unsigned); 148void __memcpy_toio(unsigned long, const void *, unsigned);
171 149