diff options
Diffstat (limited to 'arch/sandbox/include/asm/io.h')
-rw-r--r-- | arch/sandbox/include/asm/io.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 31ab7289b4b..3c0a102697e 100644 --- a/arch/sandbox/include/asm/io.h +++ b/arch/sandbox/include/asm/io.h @@ -6,6 +6,8 @@ #ifndef __SANDBOX_ASM_IO_H #define __SANDBOX_ASM_IO_H +#include <linux/types.h> + enum sandboxio_size_t { SB_SIZE_8, SB_SIZE_16, @@ -28,20 +30,6 @@ void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags); void unmap_physmem(const void *vaddr, unsigned long flags); #define unmap_physmem unmap_physmem -#include <asm-generic/io.h> - -/* For sandbox, we want addresses to point into our RAM buffer */ -static inline void *map_sysmem(phys_addr_t paddr, unsigned long len) -{ - return map_physmem(paddr, len, MAP_WRBACK); -} - -/* Remove a previous mapping */ -static inline void unmap_sysmem(const void *vaddr) -{ - unmap_physmem(vaddr, MAP_WRBACK); -} - /* Map from a pointer to our RAM buffer */ phys_addr_t map_to_sysmem(const void *ptr); @@ -229,5 +217,19 @@ static inline void memcpy_toio(volatile void *dst, const void *src, int count) #include <iotrace.h> #include <asm/types.h> +#include <asm-generic/io.h> + +/* For sandbox, we want addresses to point into our RAM buffer */ +static inline void *map_sysmem(phys_addr_t paddr, unsigned long len) +{ + return map_physmem(paddr, len, MAP_WRBACK); +} + +/* Remove a previous mapping */ +static inline void unmap_sysmem(const void *vaddr) +{ + unmap_physmem(vaddr, MAP_WRBACK); +} + #endif |