From: Uwe Kleine-König Date: Wed, 16 Dec 2009 18:05:04 +0000 (+0100) Subject: imx: provide helper macro to define IO_ADDRESS X-Git-Tag: firefly_0821_release~9833^2~2609^2~5^2~56^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1f2ddd64da6e53365102d831aa9e0446b78f0300;p=firefly-linux-kernel-4.4.55.git imx: provide helper macro to define IO_ADDRESS Signed-off-by: Uwe Kleine-König Cc: Sascha Hauer Cc: Russell King Cc: Holger Schurig Cc: Dmitriy Taychenachev --- 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 +#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 #include