In the case where the arch defines a custom map_sysmem(), make sure that
including just common.h is sufficient to have these functions as they
are when the arch does not override it.

Signed-off-by: Joe Hershberger <[email protected]>

---

Changes in v4:
-New to v4

Changes in v3: None
Changes in v2: None

 include/common.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/common.h b/include/common.h
index 77c55c6..6510efc 100644
--- a/include/common.h
+++ b/include/common.h
@@ -846,7 +846,9 @@ int cpu_release(int nr, int argc, char * const argv[]);
 #endif
 
 /* Define a null map_sysmem() if the architecture doesn't use it */
-# ifndef CONFIG_ARCH_MAP_SYSMEM
+# ifdef CONFIG_ARCH_MAP_SYSMEM
+#include <asm/io.h>
+# else
 static inline void *map_sysmem(phys_addr_t paddr, unsigned long len)
 {
        return (void *)(uintptr_t)paddr;
-- 
1.7.11.5

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to