misc. multi-omap compile fixes
Subsystems (6)
cover misc. multi-omap compile fixes
This series fixes a few things preventing compile of omap3_defconfig and also cleans up several new compiler warnings that were introduced.
Kevin Hilman (4):
OMAP2/3: IRQ: ensure valid base address
OMAP2/3: GPMC: ensure valid clock pointer
OMAP2: clock: fix misc. OMAP24xx compile issues
OMAP2/3: PRCM: fix misc. compiler warnings
arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 8 ++++---- arch/arm/mach-omap2/clock2xxx_data.c | 2 +- arch/arm/mach-omap2/gpmc.c | 5 ++++- arch/arm/mach-omap2/irq.c | 4 +++- arch/arm/mach-omap2/prcm.c | 4 +++- 5 files changed, 15 insertions(+), 8 deletions(-)
PATCH 1/4 OMAP2/3: IRQ: ensure valid base address
Ensure valid base address during IRQ init. Fixes compiler warning about potential use of uninitialized variable.
--- arch/arm/mach-omap2/irq.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/irq.c +3 -1
@@ -194,7 +194,7 @@ void __init omap_init_irq(void)int i;for (i =0 ; i <ARRAY_SIZE (irq_banks); i++) { -unsigned long base; +unsigned long base =0 ;struct omap_irq_bank *bank = irq_banks + i;if (cpu_is_omap24xx ())
@@ -202,6 +202,8 @@ void __init omap_init_irq(void)else if (cpu_is_omap34xx ()) base =OMAP34XX_IC_BASE ; +BUG_ON (!base); +/* Static mapping, never released */ bank->base_reg =ioremap (base,SZ_4K );if (!bank->base_reg) {
Signature · 1 line
1.6.6
PATCH 2/4 OMAP2/3: GPMC: ensure valid clock pointer
In reply to Kevin HilmanEnsure valud clock pointer during GPMC init. Fixes compiler warning about potential use of uninitialized variable.
--- arch/arm/mach-omap2/gpmc.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/gpmc.c +4 -1
@@ -505,7 +505,7 @@ static void __init gpmc_mem_init(void)void __init gpmc_init (void ) {u32 l; -char *ck; +char *ck =NULL ;if (cpu_is_omap24xx ()) { ck ="core_l3_ck" ;
@@ -521,6 +521,9 @@ void __init gpmc_init(void) l =OMAP44XX_GPMC_BASE ; } +if (WARN_ON (!ck)) +return ; + gpmc_l3_clk =clk_get (NULL , ck);if (IS_ERR (gpmc_l3_clk)) {printk (KERN_ERR "Could not get GPMC clock %s\n" , ck);
Signature · 1 line
1.6.6
Re: [PATCH 2/4] OMAP2/3: GPMC: ensure valid clock pointer
Quoted 1 line · ext Kevin Hilman
Ensure valud clock pointer during GPMC init. Fixes compiler
^ typo :-)
Signature · 1 line
balbi
Tony Lindgren
maintainerRe: [PATCH 2/4] OMAP2/3: GPMC: ensure valid clock pointer
Quoted 3 lines · Felipe Balbi
Quoted 1 line · ext Kevin Hilman
Ensure valud clock pointer during GPMC init. Fixes compiler
^ typo :-)
Adding the first two to omap-fixes, also fixed this typo.
Adding the last to master branch, we have to wait for Paul to merge those into his branch and then redo omap-for-linus.
Tony
PATCH 3/4 OMAP2: clock: fix misc. OMAP24xx compile issues
In reply to Kevin Hilman- Convert use of non-existant cpu_is_omap2xxx() to cpu_is_omap24xx()
- Change prefix of OMAP2 CPUfreq init/exit functions from omap2xxx_ to omap2_ as used in clock.c
- fix 'possible use of uninitialized variable' warning in omap2xxx_clk_init()
--- arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 8 ++++---- arch/arm/mach-omap2/clock2xxx_data.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +4 -4
@@ -177,14 +177,14 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate)*/ static struct cpufreq_frequency_table *freq_table; -void omap2xxx_clk_init_cpufreq_table (struct cpufreq_frequency_table **table) +void omap2_clk_init_cpufreq_table (struct cpufreq_frequency_table **table) {const struct prcm_config *prcm;long sys_ck_rate;int i =0 ;int tbl_sz =0 ; -if (!cpu_is_omap2xxx ()) +if (!cpu_is_omap24xx ())return ; sys_ck_rate =clk_get_rate (sclk);
@@ -243,9 +243,9 @@ void omap2xxx_clk_init_cpufreq_table(struct cpufreq_frequency_table **table) *table = &freq_table[0 ]; } -void omap2xxx_clk_exit_cpufreq_table (struct cpufreq_frequency_table **table) +void omap2_clk_exit_cpufreq_table (struct cpufreq_frequency_table **table) { -if (!cpu_is_omap2xxx ()) +if (!cpu_is_omap24xx ())return ;kfree (freq_table);
arch/arm/mach-omap2/clock2xxx_data.c +1 -1
@@ -2243,7 +2243,7 @@ int __init omap2xxx_clk_init(void)const struct prcm_config *prcm;struct omap_clk *c;u32 clkrate; -u16 cpu_clkflg; +u16 cpu_clkflg =0 ;if (cpu_is_omap242x ()) { prcm_clksrc_ctrl =OMAP2420_PRCM_CLKSRC_CTRL ;
Signature · 1 line
1.6.6
PATCH 4/4 OMAP2/3: PRCM: fix misc. compiler warnings
In reply to Kevin Hilman- missing return in omap_prcm_get_reset_sources()
- potential use of uninitialized variable in omap_prcm_arch_reset()
--- arch/arm/mach-omap2/prcm.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/prcm.c +3 -1
@@ -127,13 +127,15 @@ u32 omap_prcm_get_reset_sources(void)return prm_read_mod_reg (WKUP_MOD ,OMAP2_RM_RSTST ) &0x7f ;if (cpu_is_omap44xx ())return prm_read_mod_reg (WKUP_MOD ,OMAP4_RM_RSTST ) &0x7f ; + +return 0 ; }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) { -s16 prcm_offs; +s16 prcm_offs =0 ;if (cpu_is_omap24xx ()) {omap2xxx_clk_prepare_for_reboot ();
Signature · 1 line
1.6.6
Paul Walmsley
maintainerRe: [PATCH 4/4] OMAP2/3: PRCM: fix misc. compiler warnings
Quoted 4 lines · Kevin Hilman
- missing return in
omap_prcm_get_reset_sources()
- potential use of uninitialized variable inomap_prcm_arch_reset()Signed-off-by Kevin Hilman <[email protected]>
Thanks, queued for 2.6.34.
- Paul