rtc: omap: fix interrupt disable at probe
authorJohan Hovold <johan@kernel.org>
Wed, 10 Dec 2014 23:52:36 +0000 (15:52 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:13 +0000 (17:41 -0800)
Use writel instead of writeb when disabling interrupts at probe as
ALARM2 is not cleared otherwise on some IP-block revisions (e.g.
AM3352).

Note that the driver currently never enables the ALARM2 interrupt.

Signed-off-by: Johan Hovold <johan@kernel.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Benot Cousson <bcousson@baylibre.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Keerthy J <j-keerthy@ti.com>
Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-omap.c

index 828cb9983cc2678685548ceae1320f2ee3e5f703..813d475fe7c6eebc1f0b3bcedc6016a99fcb0c6e 100644 (file)
@@ -427,10 +427,12 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
        }
        platform_set_drvdata(pdev, rtc);
 
-       /* clear pending irqs, and set 1/second periodic,
-        * which we'll use instead of update irqs
+       /*
+        * disable interrupts
+        *
+        * NOTE: ALARM2 is not cleared on AM3352 if rtc_write (writeb) is used
         */
-       rtc_write(0, OMAP_RTC_INTERRUPTS_REG);
+       rtc_writel(0, OMAP_RTC_INTERRUPTS_REG);
 
        /* enable RTC functional clock */
        if (id_entry->driver_data & OMAP_RTC_HAS_32KCLK_EN) {