diff options
| author | Shawn Guo <shawn.guo@linaro.org> | 2011-10-17 02:15:08 -0400 |
|---|---|---|
| committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-10-17 15:41:03 -0400 |
| commit | 25971426532f04e9da5b2bca841bd5247138067f (patch) | |
| tree | 6e34fe491f3d2e10dcabc4be46ee1c8a49b62e3b | |
| parent | f2d9661bc99dc816cb0f01760d4ebfe2b4d840e4 (diff) | |
arm/imx: remove mx27_setup_weimcs() from mx27.h
The helper function mx27_setup_weimcs() references IOMEM() and
IMX_IO_P2V() but without required header mach/hardware.h included
in mx27.h. This will break the build of those mx27 file with no
direct inclusion of mach/hardware.h, or when indirect inclusion to
mach/hardware.h breaks.
For example, when the inclusion of mach/hardware.h gets removed from
mach/gpio.h, we will see the following compile error.
CC arch/arm/mach-imx/pm-imx27.o
In file included from arch/arm/mach-imx/pm-imx27.c:14:0:
arch/arm/plat-mxc/include/mach/mx27.h: In function ‘mx27_setup_weimcs’:
arch/arm/plat-mxc/include/mach/mx27.h:138:2: error: implicit declaration of function ‘IOMEM’
arch/arm/plat-mxc/include/mach/mx27.h:138:2: error: implicit declaration of function ‘IMX_IO_P2V’
This patch removes mx27_setup_weimcs() from mx27.h and makes it local
to mach-pcm038.c, which is the only user for this helper.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| -rw-r--r-- | arch/arm/mach-imx/mach-pcm038.c | 4 | ||||
| -rw-r--r-- | arch/arm/plat-mxc/include/mach/mx27.h | 14 |
2 files changed, 3 insertions, 15 deletions
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index 2d6a64bbac44..5a38e09f9eac 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
| @@ -176,7 +176,9 @@ static struct platform_device *platform_devices[] __initdata = { | |||
| 176 | * setup other stuffs to access the sram. */ | 176 | * setup other stuffs to access the sram. */ |
| 177 | static void __init pcm038_init_sram(void) | 177 | static void __init pcm038_init_sram(void) |
| 178 | { | 178 | { |
| 179 | mx27_setup_weimcs(1, 0x0000d843, 0x22252521, 0x22220a00); | 179 | __raw_writel(0x0000d843, MX27_IO_ADDRESS(MX27_WEIM_CSCRxU(1))); |
| 180 | __raw_writel(0x22252521, MX27_IO_ADDRESS(MX27_WEIM_CSCRxL(1))); | ||
| 181 | __raw_writel(0x22220a00, MX27_IO_ADDRESS(MX27_WEIM_CSCRxA(1))); | ||
| 180 | } | 182 | } |
| 181 | 183 | ||
| 182 | static const struct imxi2c_platform_data pcm038_i2c1_data __initconst = { | 184 | static const struct imxi2c_platform_data pcm038_i2c1_data __initconst = { |
diff --git a/arch/arm/plat-mxc/include/mach/mx27.h b/arch/arm/plat-mxc/include/mach/mx27.h index 1dc1c522601b..6265357284d7 100644 --- a/arch/arm/plat-mxc/include/mach/mx27.h +++ b/arch/arm/plat-mxc/include/mach/mx27.h | |||
| @@ -24,10 +24,6 @@ | |||
| 24 | #ifndef __MACH_MX27_H__ | 24 | #ifndef __MACH_MX27_H__ |
| 25 | #define __MACH_MX27_H__ | 25 | #define __MACH_MX27_H__ |
| 26 | 26 | ||
| 27 | #ifndef __ASSEMBLER__ | ||
| 28 | #include <linux/io.h> | ||
| 29 | #endif | ||
| 30 | |||
| 31 | #define MX27_AIPI_BASE_ADDR 0x10000000 | 27 | #define MX27_AIPI_BASE_ADDR 0x10000000 |
| 32 | #define MX27_AIPI_SIZE SZ_1M | 28 | #define MX27_AIPI_SIZE SZ_1M |
| 33 | #define MX27_DMA_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x01000) | 29 | #define MX27_DMA_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x01000) |
| @@ -131,16 +127,6 @@ | |||
| 131 | #define MX27_IO_P2V(x) IMX_IO_P2V(x) | 127 | #define MX27_IO_P2V(x) IMX_IO_P2V(x) |
| 132 | #define MX27_IO_ADDRESS(x) IOMEM(MX27_IO_P2V(x)) | 128 | #define MX27_IO_ADDRESS(x) IOMEM(MX27_IO_P2V(x)) |
| 133 | 129 | ||
| 134 | #ifndef __ASSEMBLER__ | ||
| 135 | static inline void mx27_setup_weimcs(size_t cs, | ||
| 136 | unsigned upper, unsigned lower, unsigned addional) | ||
| 137 | { | ||
| 138 | __raw_writel(upper, MX27_IO_ADDRESS(MX27_WEIM_CSCRxU(cs))); | ||
| 139 | __raw_writel(lower, MX27_IO_ADDRESS(MX27_WEIM_CSCRxL(cs))); | ||
| 140 | __raw_writel(addional, MX27_IO_ADDRESS(MX27_WEIM_CSCRxA(cs))); | ||
| 141 | } | ||
| 142 | #endif | ||
| 143 | |||
| 144 | /* fixed interrupt numbers */ | 130 | /* fixed interrupt numbers */ |
| 145 | #define MX27_INT_I2C2 1 | 131 | #define MX27_INT_I2C2 1 |
| 146 | #define MX27_INT_GPT6 2 | 132 | #define MX27_INT_GPT6 2 |
