From e7feaaa75db6f2d1cace8d26ba3fa54df020b1a5 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:28 -0300 Subject: [PATCH 01/16] ARM: mach-imx: cpu: Include "common.h" Fix the following sparse warnings: arch/arm/mach-imx/cpu.c:10:6: warning: symbol 'mxc_set_cpu_type' was not declared. Should it be static? arch/arm/mach-imx/cpu.c:15:6: warning: symbol 'imx_print_silicon_rev' was not declared. Should it be static? arch/arm/mach-imx/cpu.c:24:13: warning: symbol 'imx_set_aips' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c index 03fcbd082593..e70e3acbf9bd 100644 --- a/arch/arm/mach-imx/cpu.c +++ b/arch/arm/mach-imx/cpu.c @@ -3,6 +3,7 @@ #include #include "hardware.h" +#include "common.h" unsigned int __mxc_cpu_type; EXPORT_SYMBOL(__mxc_cpu_type); From eb7099be53655063162d3b67db7fbaf15dfac893 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:29 -0300 Subject: [PATCH 02/16] ARM: mach-imx: mm-imx3: Staticize imx3_init_l2x0() Fix the following sparse warning: arch/arm/mach-imx/mm-imx3.c:85:13: warning: symbol 'imx3_init_l2x0' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/mm-imx3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index cefa047c4053..e0e69a682174 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c @@ -82,7 +82,7 @@ static void __iomem *imx3_ioremap_caller(unsigned long phys_addr, size_t size, return __arm_ioremap_caller(phys_addr, size, mtype, caller); } -void __init imx3_init_l2x0(void) +static void __init imx3_init_l2x0(void) { #ifdef CONFIG_CACHE_L2X0 void __iomem *l2x0_base; From 4355632c54d4fd06b9fbc5d7a83dbf6437946d03 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:30 -0300 Subject: [PATCH 03/16] ARM: mach-imx: iomux-imx31: Staticize mxc_pin_alloc_map Fix the following sparse warning: arch/arm/mach-imx/iomux-imx31.c:43:15: warning: symbol 'mxc_pin_alloc_map' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/iomux-imx31.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/iomux-imx31.c b/arch/arm/mach-imx/iomux-imx31.c index cabefbc5e7c1..7c66805d2cc0 100644 --- a/arch/arm/mach-imx/iomux-imx31.c +++ b/arch/arm/mach-imx/iomux-imx31.c @@ -40,7 +40,7 @@ static DEFINE_SPINLOCK(gpio_mux_lock); #define IOMUX_REG_MASK (IOMUX_PADNUM_MASK & ~0x3) -unsigned long mxc_pin_alloc_map[NB_PORTS * 32 / BITS_PER_LONG]; +static unsigned long mxc_pin_alloc_map[NB_PORTS * 32 / BITS_PER_LONG]; /* * set the mode for a IOMUX pin. */ From 22567796220cc275e360cdb4bf9ca56067ebc5f0 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:31 -0300 Subject: [PATCH 04/16] ARM: mach-imx: cpu-imx5: Include "common.h" Fix the following sparse warnings: arch/arm/mach-imx/cpu-imx5.c:65:12: warning: symbol 'mx51_neon_fixup' was not declared. Should it be static? arch/arm/mach-imx/cpu-imx5.c:99:5: warning: symbol 'mx53_revision' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/cpu-imx5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c index d7ce72252a4e..c1c99a72c6a1 100644 --- a/arch/arm/mach-imx/cpu-imx5.c +++ b/arch/arm/mach-imx/cpu-imx5.c @@ -18,6 +18,7 @@ #include #include "hardware.h" +#include "common.h" static int mx5_cpu_rev = -1; From e9d8ab892eecf13bd60829c548e62d3dccfae3be Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:33 -0300 Subject: [PATCH 05/16] ARM: mach-imx: clk-pllv1: Staticize clk_pllv1_ops Fix the following sparse warning: arch/arm/mach-imx/clk-pllv1.c:81:16: warning: symbol 'clk_pllv1_ops' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/clk-pllv1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/clk-pllv1.c b/arch/arm/mach-imx/clk-pllv1.c index abff350ba24c..c1eaee346954 100644 --- a/arch/arm/mach-imx/clk-pllv1.c +++ b/arch/arm/mach-imx/clk-pllv1.c @@ -78,7 +78,7 @@ static unsigned long clk_pllv1_recalc_rate(struct clk_hw *hw, return ll; } -struct clk_ops clk_pllv1_ops = { +static struct clk_ops clk_pllv1_ops = { .recalc_rate = clk_pllv1_recalc_rate, }; From 191f162c40b4db205c12c25941a30f722ba0a4be Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:34 -0300 Subject: [PATCH 06/16] ARM: mach-imx: clk-pllv2: Staticize clk_pllv2_ops Fix the following sparse warning: rch/arm/mach-imx/clk-pllv2.c:232:16: warning: symbol 'clk_pllv2_ops' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/clk-pllv2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/clk-pllv2.c b/arch/arm/mach-imx/clk-pllv2.c index 0440379e3628..20889d59b44d 100644 --- a/arch/arm/mach-imx/clk-pllv2.c +++ b/arch/arm/mach-imx/clk-pllv2.c @@ -229,7 +229,7 @@ static void clk_pllv2_unprepare(struct clk_hw *hw) __raw_writel(reg, pllbase + MXC_PLL_DP_CTL); } -struct clk_ops clk_pllv2_ops = { +static struct clk_ops clk_pllv2_ops = { .prepare = clk_pllv2_prepare, .unprepare = clk_pllv2_unprepare, .recalc_rate = clk_pllv2_recalc_rate, From d7b8c030f6734fae1ef45b531a1fa26d64213b55 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:35 -0300 Subject: [PATCH 07/16] ARM: mach-imx: clk-gate2: Include "clk.h" Fix the following sparse warning: arch/arm/mach-imx/clk-gate2.c:86:12: warning: symbol 'clk_register_gate2' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/clk-gate2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/clk-gate2.c b/arch/arm/mach-imx/clk-gate2.c index cc49c7ae186e..a63e415609a8 100644 --- a/arch/arm/mach-imx/clk-gate2.c +++ b/arch/arm/mach-imx/clk-gate2.c @@ -15,6 +15,7 @@ #include #include #include +#include "clk.h" /** * DOC: basic gatable clock which can gate and ungate it's ouput From bce344eae643663c087a976f9496d143d4d32a1e Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:36 -0300 Subject: [PATCH 08/16] ARM: mach-imx: irq-common: Remove imx_irq_set_priority() imx_irq_set_priority() is not used anywhere, so remove it. This fixes the following sparse warnings: arch/arm/mach-imx/irq-common.c:24:5: warning: symbol 'imx_irq_set_priority' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/irq-common.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/arch/arm/mach-imx/irq-common.c b/arch/arm/mach-imx/irq-common.c index b6e11458e5ae..4b34f52dc46b 100644 --- a/arch/arm/mach-imx/irq-common.c +++ b/arch/arm/mach-imx/irq-common.c @@ -21,25 +21,6 @@ #include "irq-common.h" -int imx_irq_set_priority(unsigned char irq, unsigned char prio) -{ - struct irq_chip_generic *gc; - struct mxc_extra_irq *exirq; - int ret; - - ret = -ENOSYS; - - gc = irq_get_chip_data(irq); - if (gc && gc->private) { - exirq = gc->private; - if (exirq->set_priority) - ret = exirq->set_priority(irq, prio); - } - - return ret; -} -EXPORT_SYMBOL(imx_irq_set_priority); - int mxc_set_irq_fiq(unsigned int irq, unsigned int type) { struct irq_chip_generic *gc; From e6d7e6ca953405dfd80c5fb72e3359c1633c0c43 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:37 -0300 Subject: [PATCH 09/16] ARM: mach-imx: clk-busy: Staticize clk_busy_mux_ops Fix the following sparse warning: arch/arm/mach-imx/clk-busy.c:150:16: warning: symbol 'clk_busy_mux_ops' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/clk-busy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/clk-busy.c b/arch/arm/mach-imx/clk-busy.c index 1ab91b5209e6..6809c99abb40 100644 --- a/arch/arm/mach-imx/clk-busy.c +++ b/arch/arm/mach-imx/clk-busy.c @@ -147,7 +147,7 @@ static int clk_busy_mux_set_parent(struct clk_hw *hw, u8 index) return ret; } -struct clk_ops clk_busy_mux_ops = { +static struct clk_ops clk_busy_mux_ops = { .get_parent = clk_busy_mux_get_parent, .set_parent = clk_busy_mux_set_parent, }; From 41921c13c3d0434a8ea3466fa65d493816358787 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:38 -0300 Subject: [PATCH 10/16] ARM: mach-imx: clk: Include "clk.h" Fix the following sparse warning: arch/arm/mach-imx/clk.c:3:1: warning: symbol 'imx_ccm_lock' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/clk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/clk.c b/arch/arm/mach-imx/clk.c index f5e8be8e7f11..37e884ed1cd4 100644 --- a/arch/arm/mach-imx/clk.c +++ b/arch/arm/mach-imx/clk.c @@ -1,3 +1,4 @@ #include +#include "clk.h" DEFINE_SPINLOCK(imx_ccm_lock); From 516e89d7d5e5d321a8e0543cfb7f440f9942ce53 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 11:03:45 -0300 Subject: [PATCH 11/16] ARM: mach-imx: tzic: Staticize *tzic_base Fix the following sparse warning: arch/arm/mach-imx/tzic.c:52:14: warning: symbol 'tzic_base' was not declared. Should it be static? Also, remove the comment, as it does not apply for kernels newer than 3.2. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/tzic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/tzic.c b/arch/arm/mach-imx/tzic.c index 9721161f208f..8183178d5aa3 100644 --- a/arch/arm/mach-imx/tzic.c +++ b/arch/arm/mach-imx/tzic.c @@ -49,7 +49,7 @@ #define TZIC_SWINT 0x0F00 /* Software Interrupt Rigger Register */ #define TZIC_ID0 0x0FD0 /* Indentification Register 0 */ -void __iomem *tzic_base; /* Used as irq controller base in entry-macro.S */ +static void __iomem *tzic_base; static struct irq_domain *domain; #define TZIC_NUM_IRQS 128 From ae00ac76faf51dcb9f9a8cda341ae4e6829314e6 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:40 -0300 Subject: [PATCH 12/16] ARM: mach-imx: avic: Staticize *avic_base Fix the following sparse warning: arch/arm/mach-imx/avic.c:54:14: warning: symbol 'avic_base' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/avic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/avic.c b/arch/arm/mach-imx/avic.c index 0eff23ed92b9..9c3e014705b1 100644 --- a/arch/arm/mach-imx/avic.c +++ b/arch/arm/mach-imx/avic.c @@ -51,7 +51,7 @@ #define AVIC_NUM_IRQS 64 -void __iomem *avic_base; +static void __iomem *avic_base; static struct irq_domain *domain; static u32 avic_saved_mask_reg[2]; From 9a67a6fd36fea1ab360249e4b7ef2d29d3e2fac8 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:42 -0300 Subject: [PATCH 13/16] ARM: mach-imx: gpc: Include "common.h" Fix the following sparse warnings: arch/arm/mach-imx/gpc.c:29:6: warning: symbol 'imx_gpc_pre_suspend' was not declared. Should it be static? arch/arm/mach-imx/gpc.c:43:6: warning: symbol 'imx_gpc_post_resume' was not declared. Should it be static? arch/arm/mach-imx/gpc.c:71:6: warning: symbol 'imx_gpc_mask_all' was not declared. Should it be static? arch/arm/mach-imx/gpc.c:83:6: warning: symbol 'imx_gpc_restore_all' was not declared. Should it be static? arch/arm/mach-imx/gpc.c:122:13: warning: symbol 'imx_gpc_init' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/gpc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c index a96ccc7f5012..02b61cdf39b9 100644 --- a/arch/arm/mach-imx/gpc.c +++ b/arch/arm/mach-imx/gpc.c @@ -16,6 +16,7 @@ #include #include #include +#include "common.h" #define GPC_IMR1 0x008 #define GPC_PGC_CPU_PDN 0x2a0 From 0989857625ba9d446916495f619435a3b42e7be4 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:43 -0300 Subject: [PATCH 14/16] ARM: mach-imx: src: Include "common.h Fix the following sparse warnings: arch/arm/mach-imx/src.c:28:6: warning: symbol 'imx_enable_cpu' was not declared. Should it be static? arch/arm/mach-imx/src.c:39:6: warning: symbol 'imx_set_cpu_jump' was not declared. Should it be static? arch/arm/mach-imx/src.c:46:6: warning: symbol 'imx_src_prepare_restart' was not declared. Should it be static? arch/arm/mach-imx/src.c:59:13: warning: symbol 'imx_src_init' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/src.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c index e15f1555c59b..648634d9b6c3 100644 --- a/arch/arm/mach-imx/src.c +++ b/arch/arm/mach-imx/src.c @@ -16,6 +16,7 @@ #include #include #include +#include "common.h" #define SRC_SCR 0x000 #define SRC_GPR1 0x020 From f8c11b2b36a7a0f14ac98c4ca599151e1a720132 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 25 Mar 2013 09:20:44 -0300 Subject: [PATCH 15/16] ARM: mach-imx: mach-imx6q: Fix sparse warnings Fix the following sparse warnings: arch/arm/mach-imx/mach-imx6q.c:60:6: warning: symbol 'imx6q_restart' was not declared. Should it be static? arch/arm/mach-imx/mach-imx6q.c:223:24: warning: symbol 'imx6q_cpufreq_pdev' was not declared. Should it be static? Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo --- arch/arm/mach-imx/mach-imx6q.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 9ffd103b27e4..fe1b7aafabdc 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -73,7 +73,7 @@ static int imx6q_revision(void) } } -void imx6q_restart(char mode, const char *cmd) +static void imx6q_restart(char mode, const char *cmd) { struct device_node *np; void __iomem *wdog_base; @@ -256,7 +256,7 @@ put_node: of_node_put(np); } -struct platform_device imx6q_cpufreq_pdev = { +static struct platform_device imx6q_cpufreq_pdev = { .name = "imx6q-cpufreq", }; From 4f5ef62ced8e7e01179de734856e03bddb06389c Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Fri, 22 Mar 2013 01:15:02 +0100 Subject: [PATCH 16/16] ARM: cpuimx27 and mbimx27: prepend CONFIG_ to Kconfig macro Commit 2d66c7803595da0d4bcd949825d598575f5de9e6 ("cpuimx27 and mbimx27: allow fine control of UART4 and SDHC2 usage") added the Kconfig symbol MACH_EUKREA_CPUIMX27_USEUART4. But it forgot to prepend CONFIG_ to the use of its macro. Add that prefix now. Signed-off-by: Paul Bolle Signed-off-by: Sascha Hauer Signed-off-by: Shawn Guo --- arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | 4 ++-- arch/arm/mach-imx/mach-cpuimx27.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index b4c70028d359..b2f08bfbbdd3 100644 --- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c @@ -46,7 +46,7 @@ static const int eukrea_mbimx27_pins[] __initconst = { PE10_PF_UART3_CTS, PE11_PF_UART3_RTS, /* UART4 */ -#if !defined(MACH_EUKREA_CPUIMX27_USEUART4) +#if !defined(CONFIG_MACH_EUKREA_CPUIMX27_USEUART4) PB26_AF_UART4_RTS, PB28_AF_UART4_TXD, PB29_AF_UART4_CTS, @@ -306,7 +306,7 @@ void __init eukrea_mbimx27_baseboard_init(void) imx27_add_imx_uart1(&uart_pdata); imx27_add_imx_uart2(&uart_pdata); -#if !defined(MACH_EUKREA_CPUIMX27_USEUART4) +#if !defined(CONFIG_MACH_EUKREA_CPUIMX27_USEUART4) imx27_add_imx_uart3(&uart_pdata); #endif diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 146559311bd2..ea50870bda80 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c @@ -48,7 +48,7 @@ static const int eukrea_cpuimx27_pins[] __initconst = { PE14_PF_UART1_CTS, PE15_PF_UART1_RTS, /* UART4 */ -#if defined(MACH_EUKREA_CPUIMX27_USEUART4) +#if defined(CONFIG_MACH_EUKREA_CPUIMX27_USEUART4) PB26_AF_UART4_RTS, PB28_AF_UART4_TXD, PB29_AF_UART4_CTS, @@ -272,7 +272,7 @@ static void __init eukrea_cpuimx27_init(void) /* SDHC2 can be used for Wifi */ imx27_add_mxc_mmc(1, NULL); #endif -#if defined(MACH_EUKREA_CPUIMX27_USEUART4) +#if defined(CONFIG_MACH_EUKREA_CPUIMX27_USEUART4) /* in which case UART4 is also used for Bluetooth */ imx27_add_imx_uart3(&uart_pdata); #endif