Skip to contentSkip to conversation

mach-omap2: resolve remaining sparse issues

PATCH In review Paul Walmsley 2 participants 6 messages Jul 18, 2008 – Aug 5, 2008

Subsystems (6)
lore
Share & tools
lore

Paul Walmsley

author maintainer
#0 lore raw

cover mach-omap2: resolve remaining sparse issues

This series fixes the current set of sparse warnings in arch/arm/mach-omap2 for the omap2_evm_defconfig, n800_defconfig, and omap_3430sdp_defconfig configs. A few checkpatch issues are also addressed.

Boot-tested on N800 and 3430SDP ES2.

- Paul

size:
text data bss dec hex filename

2922973  134480  100984 3158437  3031a5 vmlinux.omap2evm.orig
2922941  134480  100984 3158405  303185 vmlinux.omap2evm

---

Paul Walmsley (4):
SmartReflex: fix sparse issues
mach-omap2: fix sparse warnings, some style issues for OMAP2 builds
mach-omap2: mark casts between integers and pointers with __force Add prototypes for public functions or declare private functions static:

 arch/arm/mach-omap2/board-2430sdp-flash.c |   28 ++++++++++++++--------------
 arch/arm/mach-omap2/board-n800-audio.c    |   14 ++++++++------
 arch/arm/mach-omap2/board-n800-camera.c   |    2 ++
 arch/arm/mach-omap2/board-n800.h          |    2 ++
 arch/arm/mach-omap2/clock24xx.c           |    2 +-
 arch/arm/mach-omap2/clock24xx.h           |    6 ++++--
 arch/arm/mach-omap2/clock34xx.h           |    9 ++++++---
 arch/arm/mach-omap2/gpmc.c                |   11 +++++++----
 arch/arm/mach-omap2/irq.c                 |    4 ++--
 arch/arm/mach-omap2/mailbox.c             |    4 ++--
 arch/arm/mach-omap2/mcbsp.c               |    2 +-
 arch/arm/mach-omap2/mmu.h                 |    4 ++--
 arch/arm/mach-omap2/mux.c                 |    2 +-
 arch/arm/mach-omap2/pm.c                  |    3 ++-
 arch/arm/mach-omap2/pm.h                  |   16 ++++++++++------
 arch/arm/mach-omap2/pm34xx.c              |    2 +-
 arch/arm/mach-omap2/smartreflex.c         |   10 ++++++----
 arch/arm/mach-omap2/smartreflex.h         |    3 +++
 include/asm-arm/arch-omap/mailbox.h       |    2 ++
 include/asm-arm/arch-omap/prcm.h          |    4 ++++
 20 files changed, 80 insertions(+), 50 deletions(-)
author maintainer
#1 lore raw

PATCH 1/4 Add prototypes for public functions or declare private functions static:

Fix the following sparse warnings:

arch/arm/mach-omap2/pm.c:58:6: warning: symbol 'omap2_block_sleep' was not declared. Should it be static? arch/arm/mach-omap2/pm.c:63:6: warning: symbol 'omap2_allow_sleep' was not declared. Should it be static? arch/arm/mach-omap2/pm.c:71:12: warning: symbol 'omap_pm_init' was not declared. Should it be static?

arch/arm/mach-omap2/pm34xx.c:49:6: warning: symbol '_omap_sram_idle' was not declared. Should it be static?

arch/arm/mach-omap2/prcm.c:96:5: warning: symbol 'cm_read_mod_reg' was not declared. Should it be static? arch/arm/mach-omap2/prcm.c:103:6: warning: symbol 'cm_write_mod_reg' was not declared. Should it be static? arch/arm/mach-omap2/prcm.c:110:5: warning: symbol 'cm_rmw_mod_reg_bits' was not declared. Should it be static?

---

 arch/arm/mach-omap2/pm.c         |    2 +-
 arch/arm/mach-omap2/pm.h         |    4 ++++
 arch/arm/mach-omap2/pm34xx.c     |    2 +-
 include/asm-arm/arch-omap/prcm.h |    4 ++++
 4 files changed, 10 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/pm.c +1 -1
index b7434df..f699826 100644
@@ -89,7 +89,7 @@ void omap2_allow_sleep(void)
 	BUG_ON(i < 0);
 }
 
-int __init omap_pm_init(void)
+static int __init omap_pm_init(void)
 {
 	int error = -1;
 
arch/arm/mach-omap2/pm.h +4 -0
index 0aeb461..31712f4 100644
@@ -20,6 +20,10 @@ extern unsigned short enable_dyn_sleep;
 extern unsigned short clocks_off_while_idle;
 extern atomic_t sleep_block;
 
+extern void omap2_block_sleep(void);
+extern void omap2_allow_sleep(void);
+
+
 #ifdef CONFIG_PM_DEBUG
 extern u32 omap2_read_32k_sync_counter(void);
 extern void omap2_pm_dump(int mode, int resume, unsigned int us);
arch/arm/mach-omap2/pm34xx.c +1 -1
index 449e7b5..4d5f619 100644
@@ -47,7 +47,7 @@ struct power_state {
 
 static LIST_HEAD(pwrst_list);
 
-void (*_omap_sram_idle)(u32 *addr, int save_state);
+static void (*_omap_sram_idle)(u32 *addr, int save_state);
 
 static void (*saved_idle)(void);
 
include/asm-arm/arch-omap/prcm.h +4 -0
index b707af7..9a772a9 100644
@@ -26,6 +26,10 @@
 u32 omap_prcm_get_reset_sources(void);
 void omap_prcm_arch_reset(char mode);
 
+void cm_write_mod_reg(u32 val, s16 module, u16 idx);
+u32 cm_read_mod_reg(s16 module, u16 idx);
+u32 cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx);
+
 #endif
 
 
author maintainer
#2 lore raw

PATCH 2/4 mach-omap2: mark casts between integers and pointers with __force

In reply to Paul Walmsley

Mark casts between integers and pointers with __force to keep sparse from complaining.

---

 arch/arm/mach-omap2/clock24xx.h |    6 ++++--
 arch/arm/mach-omap2/clock34xx.h |    9 ++++++---
 arch/arm/mach-omap2/gpmc.c      |   11 +++++++----
 arch/arm/mach-omap2/irq.c       |    4 ++--
 4 files changed, 19 insertions(+), 11 deletions(-)
arch/arm/mach-omap2/clock24xx.h +4 -2
index f890f2b..41d8d26 100644
@@ -604,8 +604,10 @@ static struct prcm_config rate_table[] = {
  * Since 2420 and 2430 have different cm_base, we use offsets only here.
  * Clock code will rewrite the register address as needed.
  */
-#define _CM_REG_OFFSET(module, reg)	((void __iomem *)(module) + (reg))
-#define _GR_MOD_OFFSET(reg)	((void __iomem *)(OMAP24XX_GR_MOD + (reg)))
+#define _CM_REG_OFFSET(module, reg)				\
+			((__force void __iomem *)(module) + (reg))
+#define _GR_MOD_OFFSET(reg)					\
+			((__force void __iomem *)(OMAP24XX_GR_MOD + (reg)))
 
 /*-------------------------------------------------------------------------
  * 24xx clock tree.
arch/arm/mach-omap2/clock34xx.h +6 -3
index 161da12..2f8401f 100644
@@ -178,7 +178,7 @@ static const struct clksel osc_sys_clksel[] = {
 static struct clk osc_sys_ck = {
 	.name		= "osc_sys_ck",
 	.init		= &omap2_init_clksel_parent,
-	.clksel_reg	= OMAP3430_PRM_CLKSEL,
+	.clksel_reg	= (__force void __iomem *)OMAP3430_PRM_CLKSEL,
 	.clksel_mask	= OMAP3430_SYS_CLKIN_SEL_MASK,
 	.clksel		= osc_sys_clksel,
 	/* REVISIT: deal with autoextclkmode? */
@@ -204,7 +204,7 @@ static struct clk sys_ck = {
 	.name		= "sys_ck",
 	.parent		= &osc_sys_ck,
 	.init		= &omap2_init_clksel_parent,
-	.clksel_reg	= OMAP3430_PRM_CLKSRC_CTRL,
+	.clksel_reg	= (__force void __iomem *)OMAP3430_PRM_CLKSRC_CTRL,
 	.clksel_mask	= OMAP_SYSCLKDIV_MASK,
 	.clksel		= sys_clksel,
 	.flags		= CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED,
@@ -229,7 +229,7 @@ static struct clk mcbsp_clks = {
 static struct clk sys_clkout1 = {
 	.name		= "sys_clkout1",
 	.parent		= &osc_sys_ck,
-	.enable_reg	= OMAP3430_PRM_CLKOUT_CTRL,
+	.enable_reg	= (__force void __iomem *)OMAP3430_PRM_CLKOUT_CTRL,
 	.enable_bit	= OMAP3430_CLKOUT_EN_SHIFT,
 	.flags		= CLOCK_IN_OMAP343X,
 	.recalc		= &followparent_recalc,
@@ -272,6 +272,9 @@ static const struct clksel_rate div16_dpll_rates[] = {
 #define _OMAP34XX_CM_REGADDR(module, reg)				\
 	((__force void __iomem *)(OMAP34XX_CM_REGADDR((module), (reg))))
 
+#define _OMAP34XX_PRM_REGADDR(module, reg)				\
+	((__force void __iomem *)(OMAP34XX_PRM_REGADDR((module), (reg))))
+
 /* DPLL1 */
 /* MPU clock source */
 /* Type: DPLL */
arch/arm/mach-omap2/gpmc.c +7 -4
index 83984f7..5c057a9 100644
@@ -65,12 +65,12 @@ static struct clk *gpmc_l3_clk;
 
 static void gpmc_write_reg(int idx, u32 val)
 {
-	__raw_writel(val, gpmc_base + idx);
+	__raw_writel(val, (__force void __iomem *)(gpmc_base + idx));
 }
 
 static u32 gpmc_read_reg(int idx)
 {
-	return __raw_readl(gpmc_base + idx);
+	return __raw_readl((__force void __iomem *)(gpmc_base + idx));
 }
 
 void gpmc_cs_write_reg(int cs, int idx, u32 val)
@@ -78,12 +78,15 @@ void gpmc_cs_write_reg(int cs, int idx, u32 val)
 	u32 reg_addr;
 
 	reg_addr = gpmc_base + GPMC_CS0 + (cs * GPMC_CS_SIZE) + idx;
-	__raw_writel(val, reg_addr);
+	__raw_writel(val, (__force void __iomem *)reg_addr);
 }
 
 u32 gpmc_cs_read_reg(int cs, int idx)
 {
-	return __raw_readl(gpmc_base + GPMC_CS0 + (cs * GPMC_CS_SIZE) + idx);
+	u32 reg_addr;
+
+	reg_addr = gpmc_base + GPMC_CS0 + (cs * GPMC_CS_SIZE) + idx;
+	return __raw_readl((__force void __iomem *)reg_addr);
 }
 
 /* TODO: Add support for gpmc_fck to clock framework and use it */
arch/arm/mach-omap2/irq.c +2 -2
index ce85971..441463e 100644
@@ -52,12 +52,12 @@ static struct omap_irq_bank {
 
 static void intc_bank_write_reg(u32 val, struct omap_irq_bank *bank, u16 reg)
 {
-	__raw_writel(val, bank->base_reg + reg);
+	__raw_writel(val, (__force void __iomem *)(bank->base_reg + reg));
 }
 
 static u32 intc_bank_read_reg(struct omap_irq_bank *bank, u16 reg)
 {
-	return __raw_readl(bank->base_reg + reg);
+	return __raw_readl((__force void __iomem *)(bank->base_reg + reg));
 }
 
 /* XXX: FIQ and additional INTC support (only MPU at the moment) */
author maintainer
#3 lore raw

PATCH 3/4 mach-omap2: fix sparse warnings, some style issues for OMAP2 builds

In reply to Paul Walmsley

This cleans up remaining sparse warnings for OMAP2 builds and fixes a few CodingStyle issues. This involves:

- removing casts where they don't belong,

- adding casts where they should be,

- marking internal functions as static,

- fixing some indentation in board-2430sdp-flash.c.

Patch should cause no change in kernel behavior.

---

 arch/arm/mach-omap2/board-2430sdp-flash.c |   28 ++++++++++++++--------------
 arch/arm/mach-omap2/board-n800-audio.c    |   14 ++++++++------
 arch/arm/mach-omap2/board-n800-camera.c   |    2 ++
 arch/arm/mach-omap2/board-n800.h          |    2 ++
 arch/arm/mach-omap2/clock24xx.c           |    2 +-
 arch/arm/mach-omap2/mailbox.c             |    4 ++--
 arch/arm/mach-omap2/mcbsp.c               |    2 +-
 arch/arm/mach-omap2/mmu.h                 |    4 ++--
 arch/arm/mach-omap2/mux.c                 |    2 +-
 arch/arm/mach-omap2/pm.c                  |    1 +
 arch/arm/mach-omap2/pm.h                  |   12 ++++++------
 include/asm-arm/arch-omap/mailbox.h       |    2 ++
 12 files changed, 42 insertions(+), 33 deletions(-)
arch/arm/mach-omap2/board-2430sdp-flash.c +14 -14
index 47aa8bf..aaa8db4 100644
@@ -125,16 +125,16 @@ static struct platform_device sdp_onenand_device = {
 
 void __init sdp2430_flash_init(void)
 {
-	unsigned long gpmc_base_add, gpmc_cs_base_add;
+	void __iomem *gpmc_base_add, *gpmc_cs_base_add;
 	unsigned char cs = 0;
 
-	gpmc_base_add = OMAP243X_GPMC_VIRT;
+	gpmc_base_add = (__force void __iomem *)OMAP243X_GPMC_VIRT;
 	while (cs < GPMC_CS_NUM) {
 		int ret = 0;
 
 		/* Each GPMC set for a single CS is at offset 0x30 */
-		gpmc_cs_base_add =
-			(gpmc_base_add + GPMC_OFF_CONFIG1_0 + (cs*0x30));
+		gpmc_cs_base_add = (gpmc_base_add + GPMC_OFF_CONFIG1_0 +
+				    (cs*0x30));
 
 		/* xloader/Uboot would have programmed the NAND/oneNAND
 		 * base address for us This is a ugly hack. The proper
@@ -164,22 +164,22 @@ void __init sdp2430_flash_init(void)
 	}
 
 	if (flash_type == NAND) {
-		sdp_nand_data.cs               = cs;
-		sdp_nand_data.gpmc_cs_baseaddr = (void *) gpmc_cs_base_add;
-		sdp_nand_data.gpmc_baseaddr    = (void *) gpmc_base_add;
+		sdp_nand_data.cs	       = cs;
+		sdp_nand_data.gpmc_cs_baseaddr = gpmc_cs_base_add;
+		sdp_nand_data.gpmc_baseaddr    = gpmc_base_add;
 
 		if (platform_device_register(&sdp_nand_device) < 0) {
 			printk(KERN_ERR "Unable to register NAND device\n");
-		return;
-	}
+			return;
+		}
 	}
 
 	if (flash_type == ONENAND) {
-	sdp_onenand_data.cs = cs;
+		sdp_onenand_data.cs = cs;
 
-	if (platform_device_register(&sdp_onenand_device) < 0) {
-		printk(KERN_ERR "Unable to register OneNAND device\n");
-		return;
-	}
+		if (platform_device_register(&sdp_onenand_device) < 0) {
+			printk(KERN_ERR "Unable to register OneNAND device\n");
+			return;
+		}
 	}
 }
arch/arm/mach-omap2/board-n800-audio.c +8 -6
index bebc4a5..233198e 100644
@@ -54,11 +54,13 @@ static int eac_mux_disabled = 0;
 static int clkout2_mux_disabled = 0;
 static u32 saved_mux[2];
 
+#define MUX_EAC_IOP2V(x)		(__force void __iomem *)io_p2v(x)
+
 static void n800_enable_eac_mux(void)
 {
 	if (!eac_mux_disabled)
 		return;
-	__raw_writel(saved_mux[1], IO_ADDRESS(0x48000124));
+	__raw_writel(saved_mux[1], MUX_EAC_IOP2V(0x48000124));
 	eac_mux_disabled = 0;
 }
 
@@ -68,8 +70,8 @@ static void n800_disable_eac_mux(void)
 		WARN_ON(eac_mux_disabled);
 		return;
 	}
-	saved_mux[1] = __raw_readl(IO_ADDRESS(0x48000124));
-	__raw_writel(0x1f1f1f1f, IO_ADDRESS(0x48000124));
+	saved_mux[1] = __raw_readl(MUX_EAC_IOP2V(0x48000124));
+	__raw_writel(0x1f1f1f1f, MUX_EAC_IOP2V(0x48000124));
 	eac_mux_disabled = 1;
 }
 
@@ -77,7 +79,7 @@ static void n800_enable_clkout2_mux(void)
 {
 	if (!clkout2_mux_disabled)
 		return;
-	__raw_writel(saved_mux[0], IO_ADDRESS(0x480000e8));
+	__raw_writel(saved_mux[0], MUX_EAC_IOP2V(0x480000e8));
 	clkout2_mux_disabled = 0;
 }
 
@@ -89,10 +91,10 @@ static void n800_disable_clkout2_mux(void)
 		WARN_ON(clkout2_mux_disabled);
 		return;
 	}
-	saved_mux[0] = __raw_readl(IO_ADDRESS(0x480000e8));
+	saved_mux[0] = __raw_readl(MUX_EAC_IOP2V(0x480000e8));
 	l = saved_mux[0] & ~0xff;
 	l |= 0x1f;
-	__raw_writel(l, IO_ADDRESS(0x480000e8));
+	__raw_writel(l, MUX_EAC_IOP2V(0x480000e8));
 	clkout2_mux_disabled = 1;
 }
 
arch/arm/mach-omap2/board-n800-camera.c +2 -0
index aafa547..b2c1ce4 100644
@@ -37,6 +37,8 @@
 #include <../drivers/cbus/retu.h>
 #include <../drivers/media/video/tcm825x.h>
 
+#include "board-n800.h"
+
 #if defined (CONFIG_VIDEO_TCM825X) || defined (CONFIG_VIDEO_TCM825X_MODULE)
 
 #define OMAP24XX_CAMERA_JAM_HACK
arch/arm/mach-omap2/board-n800.h +2 -0
index 96d2fa3..e71dae4 100644
@@ -18,4 +18,6 @@ void __init nokia_n800_common_init(void);
 void __init nokia_n800_map_io(void);
 void __init nokia_n800_init_irq(void);
 
+extern const struct tcm825x_platform_data n800_tcm825x_platform_data;
+
 #endif
arch/arm/mach-omap2/clock24xx.c +1 -1
index 54cc6e1..1c9351c 100644
@@ -530,7 +530,7 @@ static inline void omap2_clk_check_reg(u32 flags, void __iomem **reg)
 	*reg = (__force void __iomem *)tmp;
 }
 
-void __init omap2_clk_rewrite_base(struct clk *clk)
+static void __init omap2_clk_rewrite_base(struct clk *clk)
 {
 	omap2_clk_check_reg(clk->flags, &clk->clksel_reg);
 	omap2_clk_check_reg(clk->flags, &clk->enable_reg);
arch/arm/mach-omap2/mailbox.c +2 -2
index 4799561..ac88d32 100644
@@ -75,12 +75,12 @@ static void omap2_mbox_enable_irq(struct omap_mbox *mbox,
 
 static inline unsigned int mbox_read_reg(unsigned int reg)
 {
-	return __raw_readl(mbox_base + reg);
+	return __raw_readl((void __iomem *)(mbox_base + reg));
 }
 
 static inline void mbox_write_reg(unsigned int val, unsigned int reg)
 {
-	__raw_writel(val, mbox_base + reg);
+	__raw_writel(val, (void __iomem *)(mbox_base + reg));
 }
 
 /* Mailbox H/W preparations */
arch/arm/mach-omap2/mcbsp.c +1 -1
index 17cf199..2cca1b7 100644
@@ -185,7 +185,7 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
 #define OMAP34XX_MCBSP_PDATA_SZ		0
 #endif
 
-int __init omap2_mcbsp_init(void)
+static int __init omap2_mcbsp_init(void)
 {
 	int i;
 
arch/arm/mach-omap2/mmu.h +2 -2
index f45fcca..363eaa1 100644
@@ -105,13 +105,13 @@ struct omap_mmu_tlb_entry {
 static inline unsigned long
 omap_mmu_read_reg(struct omap_mmu *mmu, unsigned long reg)
 {
-	return __raw_readl(mmu->base + reg);
+	return __raw_readl((void __iomem *)(mmu->base + reg));
 }
 
 static inline void omap_mmu_write_reg(struct omap_mmu *mmu,
 			       unsigned long val, unsigned long reg)
 {
-	__raw_writel(val, mmu->base + reg);
+	__raw_writel(val, (void __iomem *)(mmu->base + reg));
 }
 
 #endif /* __MACH_OMAP2_MMU_H */
arch/arm/mach-omap2/mux.c +1 -1
index 5a68fb3..545e092 100644
@@ -408,7 +408,7 @@ static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 r
 #endif
 
 #ifdef CONFIG_ARCH_OMAP24XX
-int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg)
+static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg)
 {
 	static DEFINE_SPINLOCK(mux_spin_lock);
 	unsigned long flags;
arch/arm/mach-omap2/pm.c +1 -0
index f699826..524b4db 100644
@@ -28,6 +28,7 @@
 #include <asm/mach/time.h>
 #include <asm/atomic.h>
 
+#include <asm/arch/pm.h>
 #include "pm.h"
 
 unsigned short enable_dyn_sleep;
arch/arm/mach-omap2/pm.h +6 -6
index 31712f4..68c9278 100644
@@ -32,11 +32,11 @@ extern void pm_init_serial_console(void);
 extern void serial_console_sleep(int enable);
 extern int omap2_pm_debug;
 #else
-#define omap2_read_32k_sync_counter() 0;
-#define serial_console_sleep(enable) do; while(0)
-#define pm_init_serial_console() do; while(0)
-#define omap2_pm_dump(mode,resume,us) do; while(0)
-#define serial_console_fclk_mask(f1,f2)  do; while(0)
-#define omap2_pm_debug 0
+#define omap2_read_32k_sync_counter()		0
+#define serial_console_sleep(enable)		do {} while (0);
+#define pm_init_serial_console()		do {} while (0);
+#define omap2_pm_dump(mode, resume, us)		do {} while (0);
+#define serial_console_fclk_mask(f1, f2)		do {} while (0);
+#define omap2_pm_debug				0
 #endif /* CONFIG_PM_DEBUG */
 #endif
include/asm-arm/arch-omap/mailbox.h +2 -0
index 7cbed93..9d3994b 100644
@@ -61,6 +61,8 @@ struct omap_mbox {
 	void			(*err_notify)(void);
 };
 
+extern struct omap_mbox mbox_dsp_info;
+
 int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg, void *);
 void omap_mbox_init_seq(struct omap_mbox *);
 
author maintainer
#4 lore raw

PATCH 4/4 SmartReflex: fix sparse issues

In reply to Paul Walmsley

Fix sparse issues with smartreflex.c.

---

 arch/arm/mach-omap2/smartreflex.c |   10 ++++++----
 arch/arm/mach-omap2/smartreflex.h |    3 +++
 2 files changed, 9 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/smartreflex.c +6 -4
index 0f3a659..f460831 100644
@@ -60,9 +60,11 @@ struct sr_custom_clk {
 	struct omap_sr 	*sr;
 };
 
+#define SR_REGADDR(offs)     (__force void __iomem *)(sr->srbase_addr + offset)
+
 static inline void sr_write_reg(struct omap_sr *sr, int offset, u32 value)
 {
-	__raw_writel(value, sr->srbase_addr + offset);
+	__raw_writel(value, SR_REGADDR(offset));
 }
 
 static inline void sr_modify_reg(struct omap_sr *sr, int offset, u32 mask,
@@ -70,16 +72,16 @@ static inline void sr_modify_reg(struct omap_sr *sr, int offset, u32 mask,
 {
 	u32 reg_val;
 
-	reg_val = __raw_readl(sr->srbase_addr + offset);
+	reg_val = __raw_readl(SR_REGADDR(offset));
 	reg_val &= ~mask;
 	reg_val |= value;
 
-	__raw_writel(reg_val, sr->srbase_addr + offset);
+	__raw_writel(reg_val, SR_REGADDR(offset));
 }
 
 static inline u32 sr_read_reg(struct omap_sr *sr, int offset)
 {
-	return __raw_readl(sr->srbase_addr + offset);
+	return __raw_readl(SR_REGADDR(offset));
 }
 
 /* Custom clock handling functions */
arch/arm/mach-omap2/smartreflex.h +3 -0
index 9b9904d..be6e6b9 100644
@@ -248,6 +248,9 @@ extern u32 current_vdd2_opp;
 #ifdef CONFIG_OMAP_SMARTREFLEX
 void enable_smartreflex(int srid);
 void disable_smartreflex(int srid);
+int sr_voltagescale_vcbypass(u32 target_opp, u8 vsel);
+void sr_start_vddautocomap(int srid, u32 target_opp_no);
+int sr_stop_vddautocomap(int srid);
 #else
 static inline void enable_smartreflex(int srid) {}
 static inline void disable_smartreflex(int srid) {}
maintainer
#5 lore raw
In reply to Paul Walmsley
Quoted 6 lines · Paul Walmsley

This series fixes the current set of sparse warnings in arch/arm/mach-omap2 for the omap2_evm_defconfig, n800_defconfig, and omap_3430sdp_defconfig configs. A few checkpatch issues are also addressed.

Boot-tested on N800 and 3430SDP ES2.

Pushing these patches today.

Tony

Quoted 44 lines

- Paul

size:
text data bss dec hex filename

2922973  134480  100984 3158437  3031a5 vmlinux.omap2evm.orig
2922941  134480  100984 3158405  303185 vmlinux.omap2evm

---

Paul Walmsley (4):
SmartReflex: fix sparse issues
mach-omap2: fix sparse warnings, some style issues for OMAP2 builds
mach-omap2: mark casts between integers and pointers with __force Add prototypes for public functions or declare private functions static:

 arch/arm/mach-omap2/board-2430sdp-flash.c |   28 ++++++++++++++--------------
 arch/arm/mach-omap2/board-n800-audio.c    |   14 ++++++++------
 arch/arm/mach-omap2/board-n800-camera.c   |    2 ++
 arch/arm/mach-omap2/board-n800.h          |    2 ++
 arch/arm/mach-omap2/clock24xx.c           |    2 +-
 arch/arm/mach-omap2/clock24xx.h           |    6 ++++--
 arch/arm/mach-omap2/clock34xx.h           |    9 ++++++---
 arch/arm/mach-omap2/gpmc.c                |   11 +++++++----
 arch/arm/mach-omap2/irq.c                 |    4 ++--
 arch/arm/mach-omap2/mailbox.c             |    4 ++--
 arch/arm/mach-omap2/mcbsp.c               |    2 +-
 arch/arm/mach-omap2/mmu.h                 |    4 ++--
 arch/arm/mach-omap2/mux.c                 |    2 +-
 arch/arm/mach-omap2/pm.c                  |    3 ++-
 arch/arm/mach-omap2/pm.h                  |   16 ++++++++++------
 arch/arm/mach-omap2/pm34xx.c              |    2 +-
 arch/arm/mach-omap2/smartreflex.c         |   10 ++++++----
 arch/arm/mach-omap2/smartreflex.h         |    3 +++
 include/asm-arm/arch-omap/mailbox.h       |    2 ++
 include/asm-arm/arch-omap/prcm.h          |    4 ++++
 20 files changed, 80 insertions(+), 50 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html