]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
TWL4030: clear TWL GPIO interrupt status registers
authorPaul Walmsley <paul@pwsan.com>
Tue, 22 Jul 2008 23:51:27 +0000 (17:51 -0600)
committerTony Lindgren <tony@atomide.com>
Mon, 4 Aug 2008 14:12:47 +0000 (17:12 +0300)
twl_init_irq() does not clear the TWL GPIO ISR registers, but the PIH
ISR thinks that it has.  This causes any previously-latched GPIO interrupts
to be stuck on until twl4030-gpio.c initializes, often drowning the console in

    TWL4030 module irq 368 is disabled but can't be masked!

messages.  This seems to be a particular problem when booting on Beagle.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/i2c/chips/twl4030-core.c

index ff662bc0a624c87395c4e205b073ee3a0fa1f761..dfc38057c227a08d672af08af98c0a22c93cfcfb 100644 (file)
@@ -857,6 +857,48 @@ static void twl_init_irq(void)
                return;
        }
 
+       /* GPIO_ISR1A */
+       res = twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0xff, 0x19);
+       if (res < 0) {
+               pr_err("%s[%d][%d]\n", msg, res, __LINE__);
+               return;
+       }
+
+       /* GPIO_ISR2A */
+       res = twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0xff, 0x1a);
+       if (res < 0) {
+               pr_err("%s[%d][%d]\n", msg, res, __LINE__);
+               return;
+       }
+
+       /* GPIO_ISR3A */
+       res = twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0xff, 0x1b);
+       if (res < 0) {
+               pr_err("%s[%d][%d]\n", msg, res, __LINE__);
+               return;
+       }
+
+       /* GPIO_ISR1B */
+       res = twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0xff, 0x1f);
+       if (res < 0) {
+               pr_err("%s[%d][%d]\n", msg, res, __LINE__);
+               return;
+       }
+
+       /* GPIO_ISR2B */
+       res = twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0xff, 0x20);
+       if (res < 0) {
+               pr_err("%s[%d][%d]\n", msg, res, __LINE__);
+               return;
+       }
+
+       /* GPIO_ISR3B */
+       res = twl4030_i2c_write_u8(TWL4030_MODULE_GPIO, 0xff, 0x21);
+       if (res < 0) {
+               pr_err("%s[%d][%d]\n", msg, res, __LINE__);
+               return;
+       }
+
        /* install an irq handler for each of the PIH modules */
        for (i = TWL4030_IRQ_BASE; i < TWL4030_IRQ_END; i++) {
                set_irq_chip(i, &twl4030_irq_chip);