aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-omap.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2014-12-10 18:52:30 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 20:41:13 -0500
commit44c63a570aaec3c5d5569d63b7c4a31ddd88cae0 (patch)
tree40d14e8e73d6e678aa840473fb86c4644c1df2e9 /drivers/rtc/rtc-omap.c
parent16682c86d2fb68cc78c6cc0af51c2a78809dc5b0 (diff)
rtc: omap: fix clock-source configuration
This series fixes a few issues with the omap rtc-driver, cleans up a bit, adds device abstraction, and finally adds support for the PMIC control feature found in some revisions of this RTC IP block. Ultimately, this allows for powering off the Beaglebone and waking it up again on RTC alarms. This patch (of 20): Make sure not to reset the clock-source configuration when enabling the 32kHz clock mux. Until the clock source can be configured through device tree we must not overwrite settings made by the bootloader (e.g. clock-source selection). Fixes: cd914bba03d8 ("drivers/rtc/rtc-omap.c: add support for enabling 32khz clock") Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Felipe Balbi <balbi@ti.com> Tested-by: Felipe Balbi <balbi@ti.com> 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> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-omap.c')
-rw-r--r--drivers/rtc/rtc-omap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index 21142e6574a9..f842c216f2dd 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -431,8 +431,10 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
431 rtc_write(0, OMAP_RTC_INTERRUPTS_REG); 431 rtc_write(0, OMAP_RTC_INTERRUPTS_REG);
432 432
433 /* enable RTC functional clock */ 433 /* enable RTC functional clock */
434 if (id_entry->driver_data & OMAP_RTC_HAS_32KCLK_EN) 434 if (id_entry->driver_data & OMAP_RTC_HAS_32KCLK_EN) {
435 rtc_writel(OMAP_RTC_OSC_32KCLK_EN, OMAP_RTC_OSC_REG); 435 reg = rtc_read(OMAP_RTC_OSC_REG);
436 rtc_writel(reg | OMAP_RTC_OSC_32KCLK_EN, OMAP_RTC_OSC_REG);
437 }
436 438
437 /* clear old status */ 439 /* clear old status */
438 reg = rtc_read(OMAP_RTC_STATUS_REG); 440 reg = rtc_read(OMAP_RTC_STATUS_REG);