diff options
-rw-r--r-- | arch/x86/include/asm/io.h | 31 | ||||
-rw-r--r-- | arch/x86/include/asm/io_32.h | 29 | ||||
-rw-r--r-- | arch/x86/include/asm/io_64.h | 22 |
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 | */ | ||
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" |
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 | */ | ||
70 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); | ||
71 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); | ||
72 | extern 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 | */ | ||
78 | static inline void __iomem *ioremap(resource_size_t offset, unsigned long size) | ||
79 | { | ||
80 | return ioremap_nocache(offset, size); | ||
81 | } | ||
82 | |||
83 | extern void iounmap(volatile void __iomem *addr); | ||
84 | |||
85 | static inline void | 56 | static inline void |
86 | memset_io(volatile void __iomem *addr, unsigned char val, int count) | 57 | memset_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 | */ | ||
152 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); | ||
153 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); | ||
154 | extern 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 | */ | ||
160 | static inline void __iomem *ioremap(resource_size_t offset, unsigned long size) | ||
161 | { | ||
162 | return ioremap_nocache(offset, size); | ||
163 | } | ||
164 | |||
165 | extern void iounmap(volatile void __iomem *addr); | ||
166 | |||
167 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | ||
168 | |||
169 | void __memcpy_fromio(void *, unsigned long, unsigned); | 147 | void __memcpy_fromio(void *, unsigned long, unsigned); |
170 | void __memcpy_toio(unsigned long, const void *, unsigned); | 148 | void __memcpy_toio(unsigned long, const void *, unsigned); |
171 | 149 | ||