From defa8c309d280915a2e7f4451f70bcbb087088a3 Mon Sep 17 00:00:00 2001 From: Luotao Fu Date: Tue, 9 Sep 2008 10:19:43 +0200 Subject: i.MX3: Fix compiler warnings Fix some base address declaration by adding a cast. Signed-off-by: Luotao Fu Signed-off-by: Sascha Hauer --- arch/arm/mach-mx3/iomux.c | 6 ++++-- arch/arm/plat-mxc/include/mach/clock.h | 2 +- arch/arm/plat-mxc/include/mach/mx27.h | 1 + arch/arm/plat-mxc/include/mach/mx31.h | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-mx3/iomux.c b/arch/arm/mach-mx3/iomux.c index 3dda1fe23cbf..6e664be8cc13 100644 --- a/arch/arm/mach-mx3/iomux.c +++ b/arch/arm/mach-mx3/iomux.c @@ -43,7 +43,8 @@ static DEFINE_SPINLOCK(gpio_mux_lock); */ int mxc_iomux_mode(unsigned int pin_mode) { - u32 reg, field, l, mode, ret = 0; + u32 field, l, mode, ret = 0; + void __iomem *reg; reg = IOMUXSW_MUX_CTL + (pin_mode & IOMUX_REG_MASK); field = pin_mode & 0x3; @@ -70,7 +71,8 @@ EXPORT_SYMBOL(mxc_iomux_mode); */ void mxc_iomux_set_pad(enum iomux_pins pin, u32 config) { - u32 reg, field, l; + u32 field, l; + void __iomem *reg; reg = IOMUXSW_PAD_CTL + (pin + 2) / 3; field = (pin + 2) % 3; diff --git a/arch/arm/plat-mxc/include/mach/clock.h b/arch/arm/plat-mxc/include/mach/clock.h index 24caa2b7c91d..d21f78e78819 100644 --- a/arch/arm/plat-mxc/include/mach/clock.h +++ b/arch/arm/plat-mxc/include/mach/clock.h @@ -39,7 +39,7 @@ struct clk { /* Register bit position for clock's enable/disable control. */ u8 enable_shift; /* Register address for clock's enable/disable control. */ - u32 enable_reg; + void __iomem *enable_reg; u32 flags; /* get the current clock rate (always a fresh value) */ unsigned long (*get_rate) (struct clk *); diff --git a/arch/arm/plat-mxc/include/mach/mx27.h b/arch/arm/plat-mxc/include/mach/mx27.h index 212ecc246626..a86db64744a1 100644 --- a/arch/arm/plat-mxc/include/mach/mx27.h +++ b/arch/arm/plat-mxc/include/mach/mx27.h @@ -128,6 +128,7 @@ * it returns 0xDEADBEEF */ #define IO_ADDRESS(x) \ + (void __iomem *) \ (((x >= AIPI_BASE_ADDR) && (x < (AIPI_BASE_ADDR + AIPI_SIZE))) ? \ AIPI_IO_ADDRESS(x) : \ ((x >= SAHB1_BASE_ADDR) && (x < (SAHB1_BASE_ADDR + SAHB1_SIZE))) ? \ diff --git a/arch/arm/plat-mxc/include/mach/mx31.h b/arch/arm/plat-mxc/include/mach/mx31.h index a7373e4a56cb..0536f8917bc0 100644 --- a/arch/arm/plat-mxc/include/mach/mx31.h +++ b/arch/arm/plat-mxc/include/mach/mx31.h @@ -198,6 +198,7 @@ * it returns 0xDEADBEEF */ #define IO_ADDRESS(x) \ + (void __iomem *) \ (((x >= IRAM_BASE_ADDR) && (x < (IRAM_BASE_ADDR + IRAM_SIZE))) ? IRAM_IO_ADDRESS(x):\ ((x >= L2CC_BASE_ADDR) && (x < (L2CC_BASE_ADDR + L2CC_SIZE))) ? L2CC_IO_ADDRESS(x):\ ((x >= AIPS1_BASE_ADDR) && (x < (AIPS1_BASE_ADDR + AIPS1_SIZE))) ? AIPS1_IO_ADDRESS(x):\ -- cgit v1.2.1