diff options
author | Igor Prusov <ivprusov@salutedevices.com> | 2023-11-14 14:02:45 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-11-28 16:19:06 -0500 |
commit | 4f7a3463c4a2e4c4b788d56151e885f00f51b25e (patch) | |
tree | 15e5b82c73a7169617099c80751b741d14cc8276 /arch/sandbox/include/asm | |
parent | a94a4071d449e12c9fb5ac37d6362d22efcb27da (diff) | |
download | u-boot-4f7a3463c4a2e4c4b788d56151e885f00f51b25e.tar.gz u-boot-4f7a3463c4a2e4c4b788d56151e885f00f51b25e.tar.bz2 u-boot-4f7a3463c4a2e4c4b788d56151e885f00f51b25e.zip |
sandbox: move asm-generic include to the end of file
Generic version of io.h should be included at the end of
architecture-specific ones to make sure that arch implementations are
used and to avoid redefinitions.
Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/include/asm')
-rw-r--r-- | arch/sandbox/include/asm/io.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 31ab7289b4..77a02e5f52 100644 --- a/arch/sandbox/include/asm/io.h +++ b/arch/sandbox/include/asm/io.h @@ -28,20 +28,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 +215,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 |