aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic/io.h')
-rw-r--r--include/asm-generic/io.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index e0ffa3ddb02a..912088773a69 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -307,7 +307,11 @@ static inline void *phys_to_virt(unsigned long address)
307 307
308/* 308/*
309 * Change "struct page" to physical address. 309 * Change "struct page" to physical address.
310 *
311 * This implementation is for the no-MMU case only... if you have an MMU
312 * you'll need to provide your own definitions.
310 */ 313 */
314#ifndef CONFIG_MMU
311static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size) 315static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
312{ 316{
313 return (void __iomem*) (unsigned long)offset; 317 return (void __iomem*) (unsigned long)offset;
@@ -326,7 +330,9 @@ static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
326static inline void iounmap(void *addr) 330static inline void iounmap(void *addr)
327{ 331{
328} 332}
333#endif /* CONFIG_MMU */
329 334
335#ifdef CONFIG_HAS_IOPORT
330#ifndef CONFIG_GENERIC_IOMAP 336#ifndef CONFIG_GENERIC_IOMAP
331static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) 337static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
332{ 338{
@@ -340,9 +346,10 @@ static inline void ioport_unmap(void __iomem *p)
340extern void __iomem *ioport_map(unsigned long port, unsigned int nr); 346extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
341extern void ioport_unmap(void __iomem *p); 347extern void ioport_unmap(void __iomem *p);
342#endif /* CONFIG_GENERIC_IOMAP */ 348#endif /* CONFIG_GENERIC_IOMAP */
349#endif /* CONFIG_HAS_IOPORT */
343 350
344#define xlate_dev_kmem_ptr(p) p 351#define xlate_dev_kmem_ptr(p) p
345#define xlate_dev_mem_ptr(p) ((void *) (p)) 352#define xlate_dev_mem_ptr(p) __va(p)
346 353
347#ifndef virt_to_bus 354#ifndef virt_to_bus
348static inline unsigned long virt_to_bus(volatile void *address) 355static inline unsigned long virt_to_bus(volatile void *address)