Skip to contentSkip to conversation

omap fixes for -rc series

PATCH In review Tony Lindgren 2 participants 7 messages Oct 31, 2008 – Nov 6, 2008

Subsystems (6)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

cover omap fixes for -rc series

Hi all,

Here are few omap fixes for the current -rc series.

Regards,

Tony

author maintainer
#1 lore raw

PATCH 1/4 ARM: OMAP: Fix compiler warnings in gpmc.c

From: Sanjeev Premi <[email protected]>

Fix these compiler warnings:

gpmc.c: In function 'gpmc_init':
gpmc.c:432: warning: 'return' with a value, in function returning void gpmc.c:439: warning: 'return' with a value, in function returning void

---
 arch/arm/mach-omap2/gpmc.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/gpmc.c +2 -4
index 763bdbe..2249049 100644
@@ -429,18 +429,16 @@ void __init gpmc_init(void)
 	gpmc_l3_clk = clk_get(NULL, ck);
 	if (IS_ERR(gpmc_l3_clk)) {
 		printk(KERN_ERR "Could not get GPMC clock %s\n", ck);
-		return -ENODEV;
+		BUG();
 	}
 
 	gpmc_base = ioremap(l, SZ_4K);
 	if (!gpmc_base) {
 		clk_put(gpmc_l3_clk);
 		printk(KERN_ERR "Could not get GPMC register memory\n");
-		return -ENOMEM;
+		BUG();
 	}
 
-	BUG_ON(IS_ERR(gpmc_l3_clk));
-
 	l = gpmc_read_reg(GPMC_REVISION);
 	printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f);
 	/* Set smart idle mode and automatic L3 clock gating */
Signature · 1 line
1.5.6.rc3.21.g8c6b5
author maintainer
#2 lore raw

PATCH 2/4 ARM: OMAP: Fix debugfs_create_*'s error checking method for arm/plat-omap

From: Zhaolei <[email protected]>

debugfs_create_*() returns NULL if an error occurs, returns -ENODEV when debugfs is not enabled in the kernel.

Comparing to PATCH v1, because clk_debugfs_init is included in "#if defined CONFIG_DEBUG_FS", we only need to check NULL return. Thanks Li Zefan <[email protected]>

debugfs_create_u8() and other function's return value's checking method are also fixed in this patch.

---
 arch/arm/plat-omap/clock.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
arch/arm/plat-omap/clock.c +10 -10
index bf6a10c..be6aab9 100644
@@ -428,23 +428,23 @@ static int clk_debugfs_register_one(struct clk *c)
 	if (c->id != 0)
 		sprintf(p, ":%d", c->id);
 	d = debugfs_create_dir(s, pa ? pa->dent : clk_debugfs_root);
-	if (IS_ERR(d))
-		return PTR_ERR(d);
+	if (!d)
+		return -ENOMEM;
 	c->dent = d;
 
 	d = debugfs_create_u8("usecount", S_IRUGO, c->dent, (u8 *)&c->usecount);
-	if (IS_ERR(d)) {
-		err = PTR_ERR(d);
+	if (!d) {
+		err = -ENOMEM;
 		goto err_out;
 	}
 	d = debugfs_create_u32("rate", S_IRUGO, c->dent, (u32 *)&c->rate);
-	if (IS_ERR(d)) {
-		err = PTR_ERR(d);
+	if (!d) {
+		err = -ENOMEM;
 		goto err_out;
 	}
 	d = debugfs_create_x32("flags", S_IRUGO, c->dent, (u32 *)&c->flags);
-	if (IS_ERR(d)) {
-		err = PTR_ERR(d);
+	if (!d) {
+		err = -ENOMEM;
 		goto err_out;
 	}
 	return 0;
@@ -483,8 +483,8 @@ static int __init clk_debugfs_init(void)
 	int err;
 
 	d = debugfs_create_dir("clock", NULL);
-	if (IS_ERR(d))
-		return PTR_ERR(d);
+	if (!d)
+		return -ENOMEM;
 	clk_debugfs_root = d;
 
 	list_for_each_entry(c, &clocks, node) {
Signature · 1 line
1.5.6.rc3.21.g8c6b5
author maintainer
#3 lore raw

PATCH 3/4 ARM: OMAP: Fix get_irqnr_and_base to clear spurious interrupt bits

On omap24xx, INTCPS_SIR_IRQ_OFFSET bits [6:0] contains the current active interrupt number.

However, on 34xx INTCPS_SIR_IRQ_OFFSET bits [31:7] also contains the SPURIOUSIRQFLAG, which gets set if the interrupt sorting information is invalid.

If the SPURIOUSIRQFLAG bits are not ignored, the interrupt code will occasionally produce a bunch of confusing errors:

irq -33, desc: c02ddcc8, depth: 0, count: 0, unhandled: 0 ->handle_irq(): c006f23c, handle_bad_irq+0x0/0x22c ->chip(): 00000000, 0x0
->action(): 00000000

Fix this by masking out only the ACTIVEIRQ bits. Also fix a confusing comment.

---
 arch/arm/plat-omap/include/mach/entry-macro.S |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/plat-omap/include/mach/entry-macro.S +3 -1
index 030118e..2276f89 100644
@@ -65,7 +65,8 @@
 #include <mach/omap34xx.h>
 #endif
 
-#define INTCPS_SIR_IRQ_OFFSET	0x0040		/* Active interrupt number */
+#define INTCPS_SIR_IRQ_OFFSET	0x0040		/* Active interrupt offset */
+#define	ACTIVEIRQ_MASK		0x7f		/* Active interrupt bits */
 
 		.macro	disable_fiq
 		.endm
@@ -88,6 +89,7 @@
 		cmp	\irqnr, #0x0
 2222:
 		ldrne	\irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET]
+		and	\irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */
 
 		.endm
 
Signature · 1 line
1.5.6.rc3.21.g8c6b5
author maintainer
#4 lore raw

PATCH 4/4 ARM: OMAP: Fix define for twl4030 irqs

Otherwise twl4030 gpios won't work.

---
 arch/arm/plat-omap/include/mach/irqs.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/include/mach/irqs.h +1 -1
index a2929ac..bed5274 100644
@@ -372,7 +372,7 @@
 
 /* External TWL4030 gpio interrupts are optional */
 #define TWL4030_GPIO_IRQ_BASE	TWL4030_PWR_IRQ_END
-#ifdef	CONFIG_TWL4030_GPIO
+#ifdef	CONFIG_GPIO_TWL4030
 #define TWL4030_GPIO_NR_IRQS	18
 #else
 #define	TWL4030_GPIO_NR_IRQS	0
Signature · 1 line
1.5.6.rc3.21.g8c6b5
author maintainer
#6 lore raw

git pull request for omap-fixes (Re: [PATCH 0/4] omap fixes for -rc series)

Quoted 4 lines · Russell King - ARM Linux
Quoted 1 line · Tony Lindgren

Here are few omap fixes for the current -rc series.

These all look fine.

The following changes since commit 45beca08dd8b6d6a65c5ffd730af2eac7a2c7a03:
Linus Torvalds (1):

        Linux v2.6.28-rc3

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git omap-fixes

Sanjeev Premi (1):
ARM: OMAP: Fix compiler warnings in gpmc.c

Tony Lindgren (2):
ARM: OMAP: Fix get_irqnr_and_base to clear spurious interrupt bits
ARM: OMAP: Fix define for twl4030 irqs

Zhaolei (1):
ARM: OMAP: Fix debugfs_create_*'s error checking method for arm/plat-omap

 arch/arm/mach-omap2/gpmc.c                    |    6 ++----
 arch/arm/plat-omap/clock.c                    |   20 ++++++++++----------
 arch/arm/plat-omap/include/mach/entry-macro.S |    4 +++-
 arch/arm/plat-omap/include/mach/irqs.h        |    2 +-
 4 files changed, 16 insertions(+), 16 deletions(-)