From f5d7a13b18706c3328c6aac3bf782a13cabf255a Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Mon, 25 Oct 2010 11:40:30 +0200 Subject: ARM: imx: refactor the io mapping macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes it more assembler friendly and allows it to be used in situation that need an unsigned long and not a pointer. Also the naming is clearer. IOMEM is introduced without IMX_ prefix as it is used this way in more than one ARM subarch and it might become globally available soon. Signed-off-by: Uwe Kleine-König --- arch/arm/plat-mxc/include/mach/mxc91231.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'arch/arm/plat-mxc/include/mach/mxc91231.h') diff --git a/arch/arm/plat-mxc/include/mach/mxc91231.h b/arch/arm/plat-mxc/include/mach/mxc91231.h index 0ca3101ebf3..49e5e25000f 100644 --- a/arch/arm/plat-mxc/include/mach/mxc91231.h +++ b/arch/arm/plat-mxc/include/mach/mxc91231.h @@ -187,15 +187,16 @@ * it returns 0. */ -#define MXC91231_IO_ADDRESS(x) ( \ - IMX_IO_ADDRESS(x, MXC91231_L2CC) ?: \ - IMX_IO_ADDRESS(x, MXC91231_X_MEMC) ?: \ - IMX_IO_ADDRESS(x, MXC91231_ROMP) ?: \ - IMX_IO_ADDRESS(x, MXC91231_AVIC) ?: \ - IMX_IO_ADDRESS(x, MXC91231_AIPS1) ?: \ - IMX_IO_ADDRESS(x, MXC91231_SPBA0) ?: \ - IMX_IO_ADDRESS(x, MXC91231_SPBA1) ?: \ - IMX_IO_ADDRESS(x, MXC91231_AIPS2)) +#define MXC91231_IO_P2V(x) ( \ + IMX_IO_P2V_MODULE(x, MXC91231_L2CC) ?: \ + IMX_IO_P2V_MODULE(x, MXC91231_X_MEMC) ?: \ + IMX_IO_P2V_MODULE(x, MXC91231_ROMP) ?: \ + IMX_IO_P2V_MODULE(x, MXC91231_AVIC) ?: \ + IMX_IO_P2V_MODULE(x, MXC91231_AIPS1) ?: \ + IMX_IO_P2V_MODULE(x, MXC91231_SPBA0) ?: \ + IMX_IO_P2V_MODULE(x, MXC91231_SPBA1) ?: \ + IMX_IO_P2V_MODULE(x, MXC91231_AIPS2)) +#define MXC91231_IO_ADDRESS(x) IOMEM(MXC91231_IO_P2V(x)) /* * Interrupt numbers -- cgit v1.2.3-70-g09d2