omap1 sparse warning fixes
Subsystems (4)
Aaro Koskinen
maintainercover omap1 sparse warning fixes
Here's some trivial omap1 sparse warning fixes.
Aaro Koskinen (7):
arm: plat-omap: dma: make omap_dma_in_1510_mode() static
arm: mach-omap1: board-h2: make h2_nand_platdata static
arm: mach-omap1: board-innovator: make innovator_mmc_init() static
arm: mach-omap1: board-htcherald: make htcpld_chips and htcpld_pfdata static
arm: mach-omap1: board-h3: make nand_platdata static
arm: plat-omap: system.h: move voiceblue definitions into the board header
arm: mach-omap1: board-voiceblue: add missing include
arch/arm/mach-omap1/board-h2.c | 2 +- arch/arm/mach-omap1/board-h3.c | 2 +- arch/arm/mach-omap1/board-htcherald.c | 4 ++-- arch/arm/mach-omap1/board-innovator.c | 2 +- arch/arm/mach-omap1/board-voiceblue.c | 1 + arch/arm/plat-omap/dma.c | 2 +- arch/arm/plat-omap/include/plat/board-voiceblue.h | 6 ++++++ arch/arm/plat-omap/include/plat/system.h | 7 +------ 8 files changed, 14 insertions(+), 12 deletions(-)
Aaro Koskinen
maintainerPATCH 1/7 arm: plat-omap: dma: make omap_dma_in_1510_mode() static
Eliminates the following sparse warning:
arch/arm/plat-omap/dma.c:137:5: warning: symbol 'omap_dma_in_1510_mode' was not declared. Should it be static?
--- arch/arm/plat-omap/dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/dma.c +1 -1
@@ -134,7 +134,7 @@ static inline void omap_enable_channel_irq(int lch);#ifdef CONFIG_ARCH_OMAP15XX /* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */ -int omap_dma_in_1510_mode (void ) +static int omap_dma_in_1510_mode (void ) {return enable_1510_mode; }
Signature · 1 line
1.5.6.5
Aaro Koskinen
maintainerPATCH 2/7 arm: mach-omap1: board-h2: make h2_nand_platdata static
In reply to Aaro KoskinenEliminates the following sparse warning:
arch/arm/mach-omap1/board-h2.c:205:27: warning: symbol 'h2_nand_platdata' was not declared. Should it be static?
--- arch/arm/mach-omap1/board-h2.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap1/board-h2.c +1 -1
@@ -202,7 +202,7 @@ static int h2_nand_dev_ready(struct mtd_info *mtd)static const char *h2_part_probes[] = {"cmdlinepart" ,NULL }; -struct platform_nand_data h2_nand_platdata = { +static struct platform_nand_data h2_nand_platdata = { .chip = { .nr_chips =1 , .chip_offset =0 ,
Signature · 1 line
1.5.6.5
Aaro Koskinen
maintainerPATCH 3/7 arm: mach-omap1: board-innovator: make innovator_mmc_init() static
In reply to Aaro KoskinenEliminates the following sparse warning:
arch/arm/mach-omap1/board-innovator.c:368:13: warning: symbol 'innovator_mmc_init' was not declared. Should it be static?
--- arch/arm/mach-omap1/board-innovator.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap1/board-innovator.c +1 -1
@@ -365,7 +365,7 @@ static struct omap_mmc_platform_data mmc1_data = {static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC ]; -void __init innovator_mmc_init (void ) +static void __init innovator_mmc_init (void ) { mmc_data[0 ] = &mmc1_data;omap1_init_mmc (mmc_data,OMAP15XX_NR_MMC );
Signature · 1 line
1.5.6.5
Aaro Koskinen
maintainerPATCH 4/7 arm: mach-omap1: board-htcherald: make htcpld_chips and htcpld_pfdata static
In reply to Aaro KoskinenEliminates the following sparse warnings:
arch/arm/mach-omap1/board-htcherald.c:334:34: warning: symbol 'htcpld_chips' was not declared. Should it be static? arch/arm/mach-omap1/board-htcherald.c:369:34: warning: symbol 'htcpld_pfdata' was not declared. Should it be static?
--- arch/arm/mach-omap1/board-htcherald.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap1/board-htcherald.c +2 -2
@@ -331,7 +331,7 @@ static struct resource htcpld_resources[] = { }, }; -struct htcpld_chip_platform_data htcpld_chips[] = { +static struct htcpld_chip_platform_data htcpld_chips[] = { [0 ] = { .addr =0x03 , .reset =0x04 ,
@@ -366,7 +366,7 @@ struct htcpld_chip_platform_data htcpld_chips[] = { }, }; -struct htcpld_core_platform_data htcpld_pfdata = { +static struct htcpld_core_platform_data htcpld_pfdata = { .int_reset_gpio_hi =HTCPLD_GPIO_INT_RESET_HI , .int_reset_gpio_lo =HTCPLD_GPIO_INT_RESET_LO , .i2c_adapter_id =1 ,
Signature · 1 line
1.5.6.5
Aaro Koskinen
maintainerPATCH 5/7 arm: mach-omap1: board-h3: make nand_platdata static
In reply to Aaro KoskinenEliminates the following sparse warning:
arch/arm/mach-omap1/board-h3.c:207:27: warning: symbol 'nand_platdata' was not declared. Should it be static?
--- arch/arm/mach-omap1/board-h3.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap1/board-h3.c +1 -1
@@ -204,7 +204,7 @@ static int nand_dev_ready(struct mtd_info *mtd)static const char *part_probes[] = {"cmdlinepart" ,NULL }; -struct platform_nand_data nand_platdata = { +static struct platform_nand_data nand_platdata = { .chip = { .nr_chips =1 , .chip_offset =0 ,
Signature · 1 line
1.5.6.5
Aaro Koskinen
maintainerPATCH 6/7 arm: plat-omap: system.h: move voiceblue definitions into the board header
In reply to Aaro KoskinenMove voiceblue definitions into the board-specific header.
--- arch/arm/plat-omap/include/plat/board-voiceblue.h | 6 ++++++ arch/arm/plat-omap/include/plat/system.h | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-)
arch/arm/plat-omap/include/plat/board-voiceblue.h +6 -0
@@ -15,5 +15,11 @@ extern void voiceblue_wdt_enable(void);extern void voiceblue_wdt_disable (void );extern void voiceblue_wdt_ping (void ); +#ifndef CONFIG_MACH_VOICEBLUE +#define voiceblue_reset () do {} while (0) +#else +extern void voiceblue_reset (void ); +#endif +#endif /* __ASM_ARCH_VOICEBLUE_H */
arch/arm/plat-omap/include/plat/system.h +1 -6
@@ -9,14 +9,9 @@#include <asm/mach-types.h> #include <mach/hardware.h> +#include <plat/board-voiceblue.h> #include <plat/prcm.h> -#ifndef CONFIG_MACH_VOICEBLUE -#define voiceblue_reset () do {} while (0) -#else -extern void voiceblue_reset (void ); -#endif -static inline void arch_idle (void ) {cpu_do_idle ();
Signature · 1 line
1.5.6.5
PATCH 6/7 arm: plat-omap: system.h: move voiceblue definitions into the board header
Quoted 3 lines · Aaro Koskinen
Move voiceblue definitions into the board-specific header.
Signed-off-by Aaro Koskinen <[email protected]>
Let's instead simplify this, and allow other platforms to hook into the reset handler if they choose. This has only been build-tested on my omap1 (which includes voiceblue) and omap4 configurations.
8<------
Subject: ARM: OMAP: Allow platforms to hook reset cleanly
This adds a clean method to allow platforms to hook into the reset code if they require to.
--- arch/arm/mach-omap1/Makefile | 2 arch/arm/mach-omap1/board-voiceblue.c | 106 +++++++++++++++++-------------- arch/arm/mach-omap1/reset.c | 25 +++++++ arch/arm/mach-omap2/prcm.c | 5 + arch/arm/plat-omap/include/plat/prcm.h | 1 arch/arm/plat-omap/include/plat/system.h | 38 ----------- 6 files changed, 91 insertions(+), 86 deletions(-)
arch/arm/mach-omap1/Makefile +1 -1
@@ -4,7 +4,7 @@ # Common support obj-y := io.o id.o sram.o irq.o mux.o flash.o serial.o devices.o dma.o -obj-y += clock.o clock_data.o opp_data.o +obj-y += clock.o clock_data.o opp_data.o reset.o obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
arch/arm/mach-omap1/board-voiceblue.c +59 -47
131 lines not on this page · raw message
arch/arm/mach-omap1/reset.c +25 -0
@@ -0,0 +1,25 @@ +/* +* OMAP1 reset support +*/ +#include <linux/kernel.h> +#include <linux/io.h> + +#include <mach/hardware.h> +#include <mach/system.h> +#include <plat/prcm.h> + +void omap1_arch_reset (char mode,const char *cmd) +{ +/* +* Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 +* "Global Software Reset Affects Traffic Controller Frequency". +*/ +if (cpu_is_omap5912 ()) { +omap_writew (omap_readw (DPLL_CTL ) & ~(1 <<4 ),DPLL_CTL ); +omap_writew (0x8 ,ARM_RSTCT1 ); + } + +omap_writew (1 ,ARM_RSTCT1 ); +} + +void (*arch_reset)(char ,const char *) = omap1_arch_reset;
arch/arm/mach-omap2/prcm.c +4 -1
@@ -24,6 +24,7 @@#include <linux/io.h> #include <linux/delay.h> +#include <mach/system.h> #include <plat/common.h> #include <plat/prcm.h> #include <plat/irqs.h>
@@ -57,7 +58,7 @@ u32 omap_prcm_get_reset_sources(void)EXPORT_SYMBOL (omap_prcm_get_reset_sources);/* Resets clock rates and reboots the system. Only called from system.h */ -void omap_prcm_arch_reset (char mode,const char *cmd) +static void omap_prcm_arch_reset (char mode,const char *cmd) {s16 prcm_offs =0 ;
@@ -108,6 +109,8 @@ void omap_prcm_arch_reset(char mode, const char *cmd)omap2_prm_read_mod_reg (prcm_offs,OMAP2_RM_RSTCTRL );/* OCP barrier */ } +void (*arch_reset)(char ,const char *) = omap_prcm_arch_reset; +/** * omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness * @reg: physical address of module IDLEST register
arch/arm/plat-omap/include/plat/prcm.h +0 -1
@@ -28,7 +28,6 @@#define __ASM_ARM_ARCH_OMAP_PRCM_Hu32 omap_prcm_get_reset_sources (void ); -void omap_prcm_arch_reset (char mode,const char *cmd);int omap2_cm_wait_idlest (void __iomem *reg,u32 mask,u8 idlest,const char *name);
arch/arm/plat-omap/include/plat/system.h +2 -36
@@ -4,48 +4,14 @@*/ #ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H -#include <linux/clk.h> -#include <asm/mach-types.h> -#include <mach/hardware.h> - -#include <plat/prcm.h> - -#ifndef CONFIG_MACH_VOICEBLUE -#define voiceblue_reset () do {} while (0) -#else -extern void voiceblue_reset (void ); -#endif +#include <asm/proc-fns.h> static inline void arch_idle (void ) {cpu_do_idle (); } -static inline void omap1_arch_reset (char mode,const char *cmd) -{ -/* -* Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 -* "Global Software Reset Affects Traffic Controller Frequency". -*/ -if (cpu_is_omap5912 ()) { -omap_writew (omap_readw (DPLL_CTL ) & ~(1 <<4 ), -DPLL_CTL ); -omap_writew (0x8 ,ARM_RSTCT1 ); - } - -if (machine_is_voiceblue ()) -voiceblue_reset (); -else -omap_writew (1 ,ARM_RSTCT1 ); -} - -static inline void arch_reset (char mode,const char *cmd) -{ -if (!cpu_class_is_omap2 ()) -omap1_arch_reset (mode, cmd); -else -omap_prcm_arch_reset (mode, cmd); -} +extern void (*arch_reset)(char ,const char *);#endif
Tony Lindgren
maintainerPATCH 6/7 arm: plat-omap: system.h: move voiceblue definitions into the board header
Quoted 16 lines · Russell King - ARM Linux
Quoted 3 lines · Aaro Koskinen
Move voiceblue definitions into the board-specific header.
Signed-off-by Aaro Koskinen <[email protected]>Let's instead simplify this, and allow other platforms to hook into the reset handler if they choose. This has only been build-tested on my omap1 (which includes voiceblue) and omap4 configurations.
8<------
Subject: ARM: OMAP: Allow platforms to hook reset cleanlyThis adds a clean method to allow platforms to hook into the reset code if they require to.
Signed-off-by Russell King <[email protected]>
Quoted 8 lines
--- arch/arm/mach-omap1/Makefile | 2 arch/arm/mach-omap1/board-voiceblue.c | 106 +++++++++++++++++-------------- arch/arm/mach-omap1/reset.c | 25 +++++++ arch/arm/mach-omap2/prcm.c | 5 + arch/arm/plat-omap/include/plat/prcm.h | 1 arch/arm/plat-omap/include/plat/system.h | 38 ----------- 6 files changed, 91 insertions(+), 86 deletions(-)
Looks good to me. I'll queue all these into devel-cleanup branch for the next merge window.
Regards,
Tony
Aaro Koskinen
maintainerPATCH 7/7 arm: mach-omap1: board-voiceblue: add missing include
In reply to Aaro KoskinenEliminates the following sparse warnings:
arch/arm/mach-omap1/board-voiceblue.c:253:6: warning: symbol 'voiceblue_wdt_enable' was not declared. Should it be static? arch/arm/mach-omap1/board-voiceblue.c:261:6: warning: symbol 'voiceblue_wdt_disable' was not declared. Should it be static? arch/arm/mach-omap1/board-voiceblue.c:269:6: warning: symbol 'voiceblue_wdt_ping' was not declared. Should it be static? arch/arm/mach-omap1/board-voiceblue.c:278:6: warning: symbol 'voiceblue_reset' was not declared. Should it be static?
--- arch/arm/mach-omap1/board-voiceblue.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-omap1/board-voiceblue.c +1 -0
@@ -30,6 +30,7 @@#include <asm/mach/arch.h> #include <asm/mach/map.h> +#include <plat/board-voiceblue.h> #include <plat/common.h> #include <mach/gpio.h> #include <plat/flash.h>
Signature · 1 line
1.5.6.5
PATCH 7/7 arm: mach-omap1: board-voiceblue: add missing include
Quoted 6 lines · Aaro Koskinen
Eliminates the following sparse warnings:
arch/arm/mach-omap1/board-voiceblue.c:253:6: warning: symbol 'voiceblue_wdt_enable' was not declared. Should it be static?arch/arm/mach-omap1/board-voiceblue.c:261:6: warning: symbol 'voiceblue_wdt_disable' was not declared. Should it be static?arch/arm/mach-omap1/board-voiceblue.c:269:6: warning: symbol 'voiceblue_wdt_ping' was not declared. Should it be static?arch/arm/mach-omap1/board-voiceblue.c:278:6: warning: symbol 'voiceblue_reset' was not declared. Should it be static?
wasn't this caused by previous patch ?
Signature · 1 line
balbi
PATCH 7/7 arm: mach-omap1: board-voiceblue: add missing include
Quoted 9 lines · Felipe Balbi
Quoted 6 lines · Aaro Koskinen
Eliminates the following sparse warnings:
arch/arm/mach-omap1/board-voiceblue.c:253:6: warning: symbol 'voiceblue_wdt_enable' was not declared. Should it be static?arch/arm/mach-omap1/board-voiceblue.c:261:6: warning: symbol 'voiceblue_wdt_disable' was not declared. Should it be static?arch/arm/mach-omap1/board-voiceblue.c:269:6: warning: symbol 'voiceblue_wdt_ping' was not declared. Should it be static?arch/arm/mach-omap1/board-voiceblue.c:278:6: warning: symbol 'voiceblue_reset' was not declared. Should it be static?wasn't this caused by previous patch ?
no, it wasn't. Different symbols :-p
Signature · 1 line
balbi