From f16fcb634894fca5173ad6b3ee8dcc838386eeda Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Mon, 17 Oct 2011 14:15:06 +0800 Subject: arm/imx: remove mx31_setup_weimcs() from mx31.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The helper function mx31_setup_weimcs() references IOMEM() and IMX_IO_P2V() but without required header mach/hardware.h included in mx31.h. This will break the build of those mx31 based board 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/mach-pcm037_eet.o In file included from arch/arm/mach-imx/devices-imx31.h:9:0, from arch/arm/mach-imx/mach-pcm037_eet.c:20: arch/arm/plat-mxc/include/mach/mx31.h: In function ‘mx31_setup_weimcs’: arch/arm/plat-mxc/include/mach/mx31.h:129:2: error: implicit declaration of function ‘IOMEM’ arch/arm/plat-mxc/include/mach/mx31.h:129:2: error: implicit declaration of function ‘IMX_IO_P2V’ This patch removes mx31_setup_weimcs() from mx31.h and makes it local to mach-qong.c, which is the only user for this helper. Signed-off-by: Shawn Guo Signed-off-by: Sascha Hauer --- arch/arm/plat-mxc/include/mach/mx31.h | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'arch/arm/plat-mxc') diff --git a/arch/arm/plat-mxc/include/mach/mx31.h b/arch/arm/plat-mxc/include/mach/mx31.h index 79e7fc01bb59..e27619e442c0 100644 --- a/arch/arm/plat-mxc/include/mach/mx31.h +++ b/arch/arm/plat-mxc/include/mach/mx31.h @@ -1,10 +1,6 @@ #ifndef __MACH_MX31_H__ #define __MACH_MX31_H__ -#ifndef __ASSEMBLER__ -#include -#endif - /* * IRAM */ @@ -122,16 +118,6 @@ #define MX31_IO_P2V(x) IMX_IO_P2V(x) #define MX31_IO_ADDRESS(x) IOMEM(MX31_IO_P2V(x)) -#ifndef __ASSEMBLER__ -static inline void mx31_setup_weimcs(size_t cs, - unsigned upper, unsigned lower, unsigned addional) -{ - __raw_writel(upper, MX31_IO_ADDRESS(MX31_WEIM_CSCRxU(cs))); - __raw_writel(lower, MX31_IO_ADDRESS(MX31_WEIM_CSCRxL(cs))); - __raw_writel(addional, MX31_IO_ADDRESS(MX31_WEIM_CSCRxA(cs))); -} -#endif - #define MX31_INT_I2C3 3 #define MX31_INT_I2C2 4 #define MX31_INT_MPEG4_ENCODER 5 -- cgit v1.2.1 From 25971426532f04e9da5b2bca841bd5247138067f Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Mon, 17 Oct 2011 14:15:08 +0800 Subject: arm/imx: remove mx27_setup_weimcs() from mx27.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Sascha Hauer --- arch/arm/plat-mxc/include/mach/mx27.h | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'arch/arm/plat-mxc') 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 @@ #ifndef __MACH_MX27_H__ #define __MACH_MX27_H__ -#ifndef __ASSEMBLER__ -#include -#endif - #define MX27_AIPI_BASE_ADDR 0x10000000 #define MX27_AIPI_SIZE SZ_1M #define MX27_DMA_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x01000) @@ -131,16 +127,6 @@ #define MX27_IO_P2V(x) IMX_IO_P2V(x) #define MX27_IO_ADDRESS(x) IOMEM(MX27_IO_P2V(x)) -#ifndef __ASSEMBLER__ -static inline void mx27_setup_weimcs(size_t cs, - unsigned upper, unsigned lower, unsigned addional) -{ - __raw_writel(upper, MX27_IO_ADDRESS(MX27_WEIM_CSCRxU(cs))); - __raw_writel(lower, MX27_IO_ADDRESS(MX27_WEIM_CSCRxL(cs))); - __raw_writel(addional, MX27_IO_ADDRESS(MX27_WEIM_CSCRxA(cs))); -} -#endif - /* fixed interrupt numbers */ #define MX27_INT_I2C2 1 #define MX27_INT_GPT6 2 -- cgit v1.2.1