diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-06 16:29:52 -0500 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-06 16:29:52 -0500 |
commit | 133822c5c038b265ddb6545cda3a4c88815c7d3d (patch) | |
tree | daa2e77d813a26e5199285dc60dabd3baeeeb0ae /arch/x86/include/asm/io.h | |
parent | 976e8f677e42757e5586ea04a9ac8bb8ddaa037e (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/x86/include/asm/io.h')
-rw-r--r-- | arch/x86/include/asm/io.h | 31 |
1 files changed, 31 insertions, 0 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 | */ | ||
155 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); | ||
156 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); | ||
157 | extern 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 | */ | ||
163 | static inline void __iomem *ioremap(resource_size_t offset, unsigned long size) | ||
164 | { | ||
165 | return ioremap_nocache(offset, size); | ||
166 | } | ||
167 | |||
168 | extern void iounmap(volatile void __iomem *addr); | ||
169 | |||
170 | extern 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" |