Skip to contentSkip to conversation

OMAP cleanups

PATCH New Aaro Koskinen 2 participants 8 messages Nov 18, 2010 – Nov 25, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover OMAP cleanups

Some small OMAP cleanups to eliminate noise from compilation/sparse checks:

Aaro Koskinen (6):
arm: omap1: add missing includes
arm: omap1: make some functions static
arm: omap1: mbox: make variables static
arm: omap1: mbox: delete unused variable
arm: omap1: board-ams-delta: fix cast
arm: omap2: timer-gp: delete unused variable

 arch/arm/mach-omap1/board-ams-delta.c |    3 ++-
 arch/arm/mach-omap1/devices.c         |    1 +
 arch/arm/mach-omap1/flash.c           |    1 +
 arch/arm/mach-omap1/mailbox.c         |    5 ++---
 arch/arm/mach-omap1/mcbsp.c           |    2 +-
 arch/arm/mach-omap1/mux.c             |    2 +-
 arch/arm/mach-omap1/serial.c          |    2 ++
 arch/arm/mach-omap1/time.c            |    1 +
 arch/arm/mach-omap2/timer-gp.c        |    3 +--
 arch/arm/plat-omap/dma.c              |    2 +-
 arch/arm/plat-omap/sram.c             |    2 +-
 11 files changed, 14 insertions(+), 10 deletions(-)
#1 lore raw

PATCH 1/1 arm: omap1: add missing includes

Add missing includes to get rid of the following sparse warnings:

arch/arm/mach-omap1/devices.c:225:13: warning: symbol 'omap1_camera_init' was not declared. Should it be static? arch/arm/mach-omap1/flash.c:15:6: warning: symbol 'omap1_set_vpp' was not declared. Should it be static? arch/arm/mach-omap1/serial.c:190:6: warning: symbol 'omap_serial_wake_trigger' was not declared. Should it be static? arch/arm/mach-omap1/time.c:252:18: warning: symbol 'omap_timer' was not declared. Should it be static?

---
 arch/arm/mach-omap1/devices.c |    1 +
 arch/arm/mach-omap1/flash.c   |    1 +
 arch/arm/mach-omap1/serial.c  |    2 ++
 arch/arm/mach-omap1/time.c    |    1 +
 4 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/mach-omap1/devices.c +1 -0
index e7f9ee6..86ad38a 100644
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/spi/spi.h>
 
+#include <mach/camera.h>
 #include <mach/hardware.h>
 #include <asm/mach/map.h>
 
arch/arm/mach-omap1/flash.c +1 -0
index 0b07a78..acd1616 100644
@@ -11,6 +11,7 @@
 
 #include <plat/io.h>
 #include <plat/tc.h>
+#include <plat/flash.h>
 
 void omap1_set_vpp(struct map_info *map, int enable)
 {
arch/arm/mach-omap1/serial.c +2 -0
index b78d074..0845fbb 100644
@@ -27,6 +27,8 @@
 #include <mach/gpio.h>
 #include <plat/fpga.h>
 
+#include "pm.h"
+
 static struct clk * uart1_ck;
 static struct clk * uart2_ck;
 static struct clk * uart3_ck;
arch/arm/mach-omap1/time.c +1 -0
index 1be6a21..7f75bc6 100644
@@ -52,6 +52,7 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/time.h>
 
+#include <plat/common.h>
 
 #define OMAP_MPU_TIMER_BASE		OMAP_MPU_TIMER1_BASE
 #define OMAP_MPU_TIMER_OFFSET		0x100
Signature · 1 line
1.5.6.5
#2 lore raw

PATCH 1/1 arm: omap1: make some functions static

In reply to Aaro Koskinen

Make some functions static to get rid of the following sparse warnings:

arch/arm/mach-omap1/mcbsp.c:177:12: warning: symbol 'omap1_mcbsp_init' was not declared. Should it be static? arch/arm/mach-omap1/mux.c:346:22: warning: symbol 'omap1_cfg_reg' was not declared. Should it be static? arch/arm/plat-omap/dma.c:177:5: warning: symbol 'omap_dma_in_1510_mode' was not declared. Should it be static? arch/arm/plat-omap/sram.c:273:12: warning: symbol 'omap1_sram_init' was not declared. Should it be static?

---
 arch/arm/mach-omap1/mcbsp.c |    2 +-
 arch/arm/mach-omap1/mux.c   |    2 +-
 arch/arm/plat-omap/dma.c    |    2 +-
 arch/arm/plat-omap/sram.c   |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-omap1/mcbsp.c +1 -1
index b3a796a..372ea71 100644
@@ -174,7 +174,7 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
 #define OMAP16XX_MCBSP_REG_NUM		0
 #endif
 
-int __init omap1_mcbsp_init(void)
+static int __init omap1_mcbsp_init(void)
 {
 	if (cpu_is_omap7xx()) {
 		omap_mcbsp_count = OMAP7XX_MCBSP_PDATA_SZ;
arch/arm/mach-omap1/mux.c +1 -1
index 7835add..5fdef7a 100644
@@ -343,7 +343,7 @@ MUX_CFG("Y14_1610_CCP_DATAM",	 9,   21,    6,   2,   3,   1,    2,     0,  0)
 #define OMAP1XXX_PINS_SZ	0
 #endif	/* CONFIG_ARCH_OMAP15XX || CONFIG_ARCH_OMAP16XX */
 
-int __init_or_module omap1_cfg_reg(const struct pin_config *cfg)
+static int __init_or_module omap1_cfg_reg(const struct pin_config *cfg)
 {
 	static DEFINE_SPINLOCK(mux_spin_lock);
 	unsigned long flags;
arch/arm/plat-omap/dma.c +1 -1
index 2c28265..a863f55 100644
@@ -174,7 +174,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;
 }
arch/arm/plat-omap/sram.c +1 -1
index e2c8eeb..93641df 100644
@@ -270,7 +270,7 @@ void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl)
 	_omap_sram_reprogram_clock(dpllctl, ckctl);
 }
 
-int __init omap1_sram_init(void)
+static int __init omap1_sram_init(void)
 {
 	_omap_sram_reprogram_clock =
 			omap_sram_push(omap1_sram_reprogram_clock,
Signature · 1 line
1.5.6.5
#3 lore raw

PATCH 1/1 arm: omap1: mbox: make variables static

In reply to Aaro Koskinen

Make some variables static to get rid of the following warnings:

arch/arm/mach-omap1/mailbox.c:136:18: warning: symbol 'mbox_dsp_info' was not declared. Should it be static? arch/arm/mach-omap1/mailbox.c:142:18: warning: symbol 'omap1_mboxes' was not declared. Should it be static?

---
 arch/arm/mach-omap1/mailbox.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap1/mailbox.c +2 -2
index 1a85a42..12d6880 100644
@@ -133,13 +133,13 @@ static struct omap_mbox1_priv omap1_mbox_dsp_priv = {
 	},
 };
 
-struct omap_mbox mbox_dsp_info = {
+static struct omap_mbox mbox_dsp_info = {
 	.name	= "dsp",
 	.ops	= &omap1_mbox_ops,
 	.priv	= &omap1_mbox_dsp_priv,
 };
 
-struct omap_mbox *omap1_mboxes[] = { &mbox_dsp_info, NULL };
+static struct omap_mbox *omap1_mboxes[] = { &mbox_dsp_info, NULL };
 
 static int __devinit omap1_mbox_probe(struct platform_device *pdev)
 {
Signature · 1 line
1.5.6.5
#4 lore raw

PATCH 1/1 arm: omap1: mbox: delete unused variable

In reply to Aaro Koskinen

Delete unused variable from probe().

---
 arch/arm/mach-omap1/mailbox.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-omap1/mailbox.c +0 -1
index 12d6880..c0e1f48 100644
@@ -145,7 +145,6 @@ static int __devinit omap1_mbox_probe(struct platform_device *pdev)
 {
 	struct resource *mem;
 	int ret;
-	int i;
 	struct omap_mbox **list;
 
 	list = omap1_mboxes;
Signature · 1 line
1.5.6.5
#5 lore raw

PATCH 1/1 arm: omap1: board-ams-delta: fix cast

In reply to Aaro Koskinen

Use IOMEM() macro to get rid of the following sparse warning:

	arch/arm/mach-omap1/board-ams-delta.c:319:36: warning: incorrect type in initializer (different address spaces)
	arch/arm/mach-omap1/board-ams-delta.c:319:36:    expected void [noderef] <asn:2>*membase
	arch/arm/mach-omap1/board-ams-delta.c:319:36:    got void *<noident>
---
 arch/arm/mach-omap1/board-ams-delta.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/mach-omap1/board-ams-delta.c +2 -1
index 1d4163b..1948cd3 100644
@@ -28,6 +28,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
+#include <plat/io.h>
 #include <plat/board-ams-delta.h>
 #include <mach/gpio.h>
 #include <plat/keypad.h>
@@ -316,7 +317,7 @@ static void __init ams_delta_init(void)
 
 static struct plat_serial8250_port ams_delta_modem_ports[] = {
 	{
-		.membase	= (void *) AMS_DELTA_MODEM_VIRT,
+		.membase	= IOMEM(AMS_DELTA_MODEM_VIRT),
 		.mapbase	= AMS_DELTA_MODEM_PHYS,
 		.irq		= -EINVAL, /* changed later */
 		.flags		= UPF_BOOT_AUTOCONF,
Signature · 1 line
1.5.6.5
#6 lore raw

PATCH 1/1 arm: omap2: timer-gp: delete unused variable

In reply to Aaro Koskinen

Delete a redundant local variable.

---
 arch/arm/mach-omap2/timer-gp.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/timer-gp.c +1 -2
index e13c29e..f9052e1 100644
@@ -203,7 +203,7 @@ static struct clocksource clocksource_gpt = {
 static void __init omap2_gp_clocksource_init(void)
 {
 	static struct omap_dm_timer *gpt;
-	u32 tick_rate, tick_period;
+	u32 tick_rate;
 	static char err1[] __initdata = KERN_ERR
 		"%s: failed to request dm-timer\n";
 	static char err2[] __initdata = KERN_ERR
@@ -216,7 +216,6 @@ static void __init omap2_gp_clocksource_init(void)
 
 	omap_dm_timer_set_source(gpt, OMAP_TIMER_SRC_SYS_CLK);
 	tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gpt));
-	tick_period = (tick_rate / HZ) - 1;
 
 	omap_dm_timer_set_load_start(gpt, 1, 0);
 
Signature · 1 line
1.5.6.5
maintainer
#7 lore raw

cover OMAP cleanups

In reply to Aaro Koskinen
Quoted 2 lines · Aaro Koskinen

Some small OMAP cleanups to eliminate noise from compilation/sparse checks:

Thanks, will queue these for 2.6.38 merge window.

Regards,

Tony