public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] omap fixes for -rc series
@ 2008-10-31  2:11 Tony Lindgren
  2008-10-31  2:11 ` [PATCH 1/4] ARM: OMAP: Fix compiler warnings in gpmc.c Tony Lindgren
  2008-11-06 14:28 ` [PATCH 0/4] omap fixes for -rc series Russell King - ARM Linux
  0 siblings, 2 replies; 7+ messages in thread
From: Tony Lindgren @ 2008-10-31  2:11 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Tony Lindgren

Hi all,

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

Regards,

Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] ARM: OMAP: Fix compiler warnings in gpmc.c
  2008-10-31  2:11 [PATCH 0/4] omap fixes for -rc series Tony Lindgren
@ 2008-10-31  2:11 ` Tony Lindgren
  2008-10-31  2:11   ` [PATCH 2/4] ARM: OMAP: Fix debugfs_create_*'s error checking method for arm/plat-omap Tony Lindgren
  2008-11-06 14:28 ` [PATCH 0/4] omap fixes for -rc series Russell King - ARM Linux
  1 sibling, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2008-10-31  2:11 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Sanjeev Premi, Tony Lindgren

From: Sanjeev Premi <premi@ti.com>

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

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/gpmc.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 763bdbe..2249049 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -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 */
-- 
1.5.6.rc3.21.g8c6b5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] ARM: OMAP: Fix debugfs_create_*'s error checking method for arm/plat-omap
  2008-10-31  2:11 ` [PATCH 1/4] ARM: OMAP: Fix compiler warnings in gpmc.c Tony Lindgren
@ 2008-10-31  2:11   ` Tony Lindgren
  2008-10-31  2:11     ` [PATCH 3/4] ARM: OMAP: Fix get_irqnr_and_base to clear spurious interrupt bits Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2008-10-31  2:11 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Zhaolei, Tony Lindgren

From: Zhaolei <zhaolei@cn.fujitsu.com>

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 <lizf@cn.fujitsu.com>

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

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/clock.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index bf6a10c..be6aab9 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -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) {
-- 
1.5.6.rc3.21.g8c6b5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] ARM: OMAP: Fix get_irqnr_and_base to clear spurious interrupt bits
  2008-10-31  2:11   ` [PATCH 2/4] ARM: OMAP: Fix debugfs_create_*'s error checking method for arm/plat-omap Tony Lindgren
@ 2008-10-31  2:11     ` Tony Lindgren
  2008-10-31  2:11       ` [PATCH 4/4] ARM: OMAP: Fix define for twl4030 irqs Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2008-10-31  2:11 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Tony Lindgren

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.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/include/mach/entry-macro.S |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/entry-macro.S b/arch/arm/plat-omap/include/mach/entry-macro.S
index 030118e..2276f89 100644
--- a/arch/arm/plat-omap/include/mach/entry-macro.S
+++ b/arch/arm/plat-omap/include/mach/entry-macro.S
@@ -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
 
-- 
1.5.6.rc3.21.g8c6b5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] ARM: OMAP: Fix define for twl4030 irqs
  2008-10-31  2:11     ` [PATCH 3/4] ARM: OMAP: Fix get_irqnr_and_base to clear spurious interrupt bits Tony Lindgren
@ 2008-10-31  2:11       ` Tony Lindgren
  0 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2008-10-31  2:11 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-omap, Tony Lindgren

Otherwise twl4030 gpios won't work.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/include/mach/irqs.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/irqs.h b/arch/arm/plat-omap/include/mach/irqs.h
index a2929ac..bed5274 100644
--- a/arch/arm/plat-omap/include/mach/irqs.h
+++ b/arch/arm/plat-omap/include/mach/irqs.h
@@ -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
-- 
1.5.6.rc3.21.g8c6b5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] omap fixes for -rc series
  2008-10-31  2:11 [PATCH 0/4] omap fixes for -rc series Tony Lindgren
  2008-10-31  2:11 ` [PATCH 1/4] ARM: OMAP: Fix compiler warnings in gpmc.c Tony Lindgren
@ 2008-11-06 14:28 ` Russell King - ARM Linux
  2008-11-06 17:29   ` git pull request for omap-fixes (Re: [PATCH 0/4] omap fixes for -rc series) Tony Lindgren
  1 sibling, 1 reply; 7+ messages in thread
From: Russell King - ARM Linux @ 2008-11-06 14:28 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-arm-kernel, linux-omap

On Thu, Oct 30, 2008 at 07:11:14PM -0700, Tony Lindgren wrote:
> Here are few omap fixes for the current -rc series.

These all look fine.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* git pull request for omap-fixes (Re: [PATCH 0/4] omap fixes for -rc series)
  2008-11-06 14:28 ` [PATCH 0/4] omap fixes for -rc series Russell King - ARM Linux
@ 2008-11-06 17:29   ` Tony Lindgren
  0 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2008-11-06 17:29 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-arm-kernel, linux-omap

* Russell King - ARM Linux <linux@arm.linux.org.uk> [081106 06:29]:
> On Thu, Oct 30, 2008 at 07:11:14PM -0700, Tony Lindgren wrote:
> > 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(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-11-06 17:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-31  2:11 [PATCH 0/4] omap fixes for -rc series Tony Lindgren
2008-10-31  2:11 ` [PATCH 1/4] ARM: OMAP: Fix compiler warnings in gpmc.c Tony Lindgren
2008-10-31  2:11   ` [PATCH 2/4] ARM: OMAP: Fix debugfs_create_*'s error checking method for arm/plat-omap Tony Lindgren
2008-10-31  2:11     ` [PATCH 3/4] ARM: OMAP: Fix get_irqnr_and_base to clear spurious interrupt bits Tony Lindgren
2008-10-31  2:11       ` [PATCH 4/4] ARM: OMAP: Fix define for twl4030 irqs Tony Lindgren
2008-11-06 14:28 ` [PATCH 0/4] omap fixes for -rc series Russell King - ARM Linux
2008-11-06 17:29   ` git pull request for omap-fixes (Re: [PATCH 0/4] omap fixes for -rc series) Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox