* [PATCH 0/4] mach-omap2: resolve remaining sparse issues
@ 2008-07-18 2:52 Paul Walmsley
2008-07-18 2:52 ` [PATCH 1/4] Add prototypes for public functions or declare private functions static: Paul Walmsley
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Paul Walmsley @ 2008-07-18 2:52 UTC (permalink / raw)
To: linux-omap
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(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] Add prototypes for public functions or declare private functions static:
2008-07-18 2:52 [PATCH 0/4] mach-omap2: resolve remaining sparse issues Paul Walmsley
@ 2008-07-18 2:52 ` Paul Walmsley
2008-07-18 2:52 ` [PATCH 2/4] mach-omap2: mark casts between integers and pointers with __force Paul Walmsley
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Paul Walmsley @ 2008-07-18 2:52 UTC (permalink / raw)
To: linux-omap
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?
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
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(-)
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index b7434df..f699826 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -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;
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 0aeb461..31712f4 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -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);
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 449e7b5..4d5f619 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -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);
diff --git a/include/asm-arm/arch-omap/prcm.h b/include/asm-arm/arch-omap/prcm.h
index b707af7..9a772a9 100644
--- a/include/asm-arm/arch-omap/prcm.h
+++ b/include/asm-arm/arch-omap/prcm.h
@@ -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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] mach-omap2: mark casts between integers and pointers with __force
2008-07-18 2:52 [PATCH 0/4] mach-omap2: resolve remaining sparse issues Paul Walmsley
2008-07-18 2:52 ` [PATCH 1/4] Add prototypes for public functions or declare private functions static: Paul Walmsley
@ 2008-07-18 2:52 ` Paul Walmsley
2008-07-18 2:52 ` [PATCH 3/4] mach-omap2: fix sparse warnings, some style issues for OMAP2 builds Paul Walmsley
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Paul Walmsley @ 2008-07-18 2:52 UTC (permalink / raw)
To: linux-omap
Mark casts between integers and pointers with __force to keep sparse
from complaining.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
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(-)
diff --git a/arch/arm/mach-omap2/clock24xx.h b/arch/arm/mach-omap2/clock24xx.h
index f890f2b..41d8d26 100644
--- a/arch/arm/mach-omap2/clock24xx.h
+++ b/arch/arm/mach-omap2/clock24xx.h
@@ -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.
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index 161da12..2f8401f 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -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 */
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 83984f7..5c057a9 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -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 */
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index ce85971..441463e 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -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) */
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] mach-omap2: fix sparse warnings, some style issues for OMAP2 builds
2008-07-18 2:52 [PATCH 0/4] mach-omap2: resolve remaining sparse issues Paul Walmsley
2008-07-18 2:52 ` [PATCH 1/4] Add prototypes for public functions or declare private functions static: Paul Walmsley
2008-07-18 2:52 ` [PATCH 2/4] mach-omap2: mark casts between integers and pointers with __force Paul Walmsley
@ 2008-07-18 2:52 ` Paul Walmsley
2008-07-18 2:52 ` [PATCH 4/4] SmartReflex: fix sparse issues Paul Walmsley
2008-08-05 11:49 ` [PATCH 0/4] mach-omap2: resolve remaining " Tony Lindgren
4 siblings, 0 replies; 6+ messages in thread
From: Paul Walmsley @ 2008-07-18 2:52 UTC (permalink / raw)
To: linux-omap
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.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
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(-)
diff --git a/arch/arm/mach-omap2/board-2430sdp-flash.c b/arch/arm/mach-omap2/board-2430sdp-flash.c
index 47aa8bf..aaa8db4 100644
--- a/arch/arm/mach-omap2/board-2430sdp-flash.c
+++ b/arch/arm/mach-omap2/board-2430sdp-flash.c
@@ -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;
+ }
}
}
diff --git a/arch/arm/mach-omap2/board-n800-audio.c b/arch/arm/mach-omap2/board-n800-audio.c
index bebc4a5..233198e 100644
--- a/arch/arm/mach-omap2/board-n800-audio.c
+++ b/arch/arm/mach-omap2/board-n800-audio.c
@@ -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;
}
diff --git a/arch/arm/mach-omap2/board-n800-camera.c b/arch/arm/mach-omap2/board-n800-camera.c
index aafa547..b2c1ce4 100644
--- a/arch/arm/mach-omap2/board-n800-camera.c
+++ b/arch/arm/mach-omap2/board-n800-camera.c
@@ -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
diff --git a/arch/arm/mach-omap2/board-n800.h b/arch/arm/mach-omap2/board-n800.h
index 96d2fa3..e71dae4 100644
--- a/arch/arm/mach-omap2/board-n800.h
+++ b/arch/arm/mach-omap2/board-n800.h
@@ -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
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
index 54cc6e1..1c9351c 100644
--- a/arch/arm/mach-omap2/clock24xx.c
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -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);
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 4799561..ac88d32 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -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 */
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index 17cf199..2cca1b7 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -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;
diff --git a/arch/arm/mach-omap2/mmu.h b/arch/arm/mach-omap2/mmu.h
index f45fcca..363eaa1 100644
--- a/arch/arm/mach-omap2/mmu.h
+++ b/arch/arm/mach-omap2/mmu.h
@@ -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 */
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 5a68fb3..545e092 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -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;
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index f699826..524b4db 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -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;
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 31712f4..68c9278 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -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
diff --git a/include/asm-arm/arch-omap/mailbox.h b/include/asm-arm/arch-omap/mailbox.h
index 7cbed93..9d3994b 100644
--- a/include/asm-arm/arch-omap/mailbox.h
+++ b/include/asm-arm/arch-omap/mailbox.h
@@ -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 *);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] SmartReflex: fix sparse issues
2008-07-18 2:52 [PATCH 0/4] mach-omap2: resolve remaining sparse issues Paul Walmsley
` (2 preceding siblings ...)
2008-07-18 2:52 ` [PATCH 3/4] mach-omap2: fix sparse warnings, some style issues for OMAP2 builds Paul Walmsley
@ 2008-07-18 2:52 ` Paul Walmsley
2008-08-05 11:49 ` [PATCH 0/4] mach-omap2: resolve remaining " Tony Lindgren
4 siblings, 0 replies; 6+ messages in thread
From: Paul Walmsley @ 2008-07-18 2:52 UTC (permalink / raw)
To: linux-omap
Fix sparse issues with smartreflex.c.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
arch/arm/mach-omap2/smartreflex.c | 10 ++++++----
arch/arm/mach-omap2/smartreflex.h | 3 +++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index 0f3a659..f460831 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -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 */
diff --git a/arch/arm/mach-omap2/smartreflex.h b/arch/arm/mach-omap2/smartreflex.h
index 9b9904d..be6e6b9 100644
--- a/arch/arm/mach-omap2/smartreflex.h
+++ b/arch/arm/mach-omap2/smartreflex.h
@@ -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) {}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] mach-omap2: resolve remaining sparse issues
2008-07-18 2:52 [PATCH 0/4] mach-omap2: resolve remaining sparse issues Paul Walmsley
` (3 preceding siblings ...)
2008-07-18 2:52 ` [PATCH 4/4] SmartReflex: fix sparse issues Paul Walmsley
@ 2008-08-05 11:49 ` Tony Lindgren
4 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2008-08-05 11:49 UTC (permalink / raw)
To: Paul Walmsley; +Cc: linux-omap
* Paul Walmsley <paul@pwsan.com> [080718 06:13]:
> 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
>
> - 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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-08-05 11:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 2:52 [PATCH 0/4] mach-omap2: resolve remaining sparse issues Paul Walmsley
2008-07-18 2:52 ` [PATCH 1/4] Add prototypes for public functions or declare private functions static: Paul Walmsley
2008-07-18 2:52 ` [PATCH 2/4] mach-omap2: mark casts between integers and pointers with __force Paul Walmsley
2008-07-18 2:52 ` [PATCH 3/4] mach-omap2: fix sparse warnings, some style issues for OMAP2 builds Paul Walmsley
2008-07-18 2:52 ` [PATCH 4/4] SmartReflex: fix sparse issues Paul Walmsley
2008-08-05 11:49 ` [PATCH 0/4] mach-omap2: resolve remaining " Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox