From: Johan Hovold Date: Wed, 10 Dec 2014 23:52:36 +0000 (-0800) Subject: rtc: omap: fix interrupt disable at probe X-Git-Tag: v3.19-rc1~135^2~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ed8b5d26c33d5c95845be7d51aae2bf6f1b053c;p=platform%2Fkernel%2Flinux-stable.git rtc: omap: fix interrupt disable at probe 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 Cc: Alessandro Zummo Cc: Tony Lindgren Cc: Benot Cousson Cc: Lokesh Vutla Cc: Guenter Roeck Cc: Sekhar Nori Cc: Tero Kristo Cc: Keerthy J Tested-by: Felipe Balbi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index 828cb99..813d475 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -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) {