[PATCH 1/9] common.h: use special IOMEM() for MIPS
Antony Pavlov
antonynpavlov at gmail.com
Wed Sep 10 00:42:18 PDT 2014
Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
---
include/common.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/common.h b/include/common.h
index de63571..fca9798 100644
--- a/include/common.h
+++ b/include/common.h
@@ -271,7 +271,13 @@ void barebox_set_model(const char *);
const char *barebox_get_hostname(void);
void barebox_set_hostname(const char *);
+#if defined(CONFIG_MIPS)
+#include <asm/addrspace.h>
+
+#define IOMEM(addr) ((void __force __iomem *)CKSEG1ADDR(addr))
+#else
#define IOMEM(addr) ((void __force __iomem *)(addr))
+#endif
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
--
2.1.0
More information about the barebox
mailing list