diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2009-12-16 19:05:04 +0100 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-01-08 16:41:23 +0100 |
commit | 1f2ddd64da6e53365102d831aa9e0446b78f0300 (patch) | |
tree | a95e2e90d44a681f436dbce57964e6eb30a5d65f /arch | |
parent | 321ed164369bb5e4888eb24d70ebc64c232ffc31 (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')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/hardware.h | 5 |
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 78db75475f6..db14c56930a 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> |