aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/include
diff options
context:
space:
mode:
authorUwe Kleine-König2009-12-16 19:05:04 +0100
committerUwe Kleine-König2010-01-08 16:41:23 +0100
commit1f2ddd64da6e53365102d831aa9e0446b78f0300 (patch)
treea95e2e90d44a681f436dbce57964e6eb30a5d65f /arch/arm/plat-mxc/include
parent321ed164369bb5e4888eb24d70ebc64c232ffc31 (diff)
imx: provide helper macro to define IO_ADDRESS
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Russell King <linux@arm.linux.org.uk> Cc: Holger Schurig <hs4233@mail.mn-solutions.de> Cc: Dmitriy Taychenachev <dimichxp@gmail.com>
Diffstat (limited to 'arch/arm/plat-mxc/include')
-rw-r--r--arch/arm/plat-mxc/include/mach/hardware.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
index 78db75475f69..db14c56930a3 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -22,6 +22,11 @@
#include <asm/sizes.h>
+#define IMX_IO_ADDRESS(addr, module) \
+ ((void __force __iomem *) \
+ (((unsigned long)((addr) - (module ## _BASE_ADDR)) < module ## _SIZE) ?\
+ (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0))
+
#ifdef CONFIG_ARCH_MX3
#include <mach/mx3x.h>
#include <mach/mx31.h>