summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/include/mach/hardware.h
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-10-25 15:38:09 +0200
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-11-17 08:58:09 +0100
commit08ff97b5214143c3bd47add6ec49097cb848120a (patch)
treec0782c278ba2f28f6f622be3ce82aa1a9ddb2e22 /arch/arm/plat-mxc/include/mach/hardware.h
parentf5d7a13b18706c3328c6aac3bf782a13cabf255a (diff)
ARM: imx: use MXxy_IO_P2V macros to setup static mappings
This makes less code rely on the virtual constants. To further simplify code and reduce the needed boilerplate when defining the static mappings a new helper macro is defined in mach/hardware.h. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc/include/mach/hardware.h')
-rw-r--r--arch/arm/plat-mxc/include/mach/hardware.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
index 4bbe50612d14..409cec6223df 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -66,4 +66,11 @@
#include <mach/mxc.h>
+#define imx_map_entry(soc, name, _type) { \
+ .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \
+ .pfn = __phys_to_pfn(soc ## _ ## name ## _BASE_ADDR), \
+ .length = soc ## _ ## name ## _SIZE, \
+ .type = _type, \
+}
+
#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */