git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
asm-generic: add MMU variants of io.h functions
[pandora-kernel.git]
/
include
/
asm-generic
/
io.h
diff --git
a/include/asm-generic/io.h
b/include/asm-generic/io.h
index
e0ffa3d
..
a1caf2d
100644
(file)
--- 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)
/*
* Change "struct page" to physical address.
/*
* Change "struct page" to physical address.
+ *
+ * This implementation is for the no-MMU case only... if you have an MMU
+ * you'll need to provide your own definitions.
*/
*/
+#ifndef CONFIG_MMU
static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
{
return (void __iomem*) (unsigned long)offset;
static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
{
return (void __iomem*) (unsigned long)offset;
@@
-326,6
+330,7
@@
static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
static inline void iounmap(void *addr)
{
}
static inline void iounmap(void *addr)
{
}
+#endif /* CONFIG_MMU */
#ifndef CONFIG_GENERIC_IOMAP
static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
#ifndef CONFIG_GENERIC_IOMAP
static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
@@
-342,7
+347,7
@@
extern void ioport_unmap(void __iomem *p);
#endif /* CONFIG_GENERIC_IOMAP */
#define xlate_dev_kmem_ptr(p) p
#endif /* CONFIG_GENERIC_IOMAP */
#define xlate_dev_kmem_ptr(p) p
-#define xlate_dev_mem_ptr(p)
((void *) (p)
)
+#define xlate_dev_mem_ptr(p)
__va(p
)
#ifndef virt_to_bus
static inline unsigned long virt_to_bus(volatile void *address)
#ifndef virt_to_bus
static inline unsigned long virt_to_bus(volatile void *address)