提交 44c63a57 编写于 作者: J Johan Hovold 提交者: Linus Torvalds

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: cd914bba ("drivers/rtc/rtc-omap.c: add support for enabling 32khz clock")
Signed-off-by: NJohan Hovold <johan@kernel.org>
Reviewed-by: NFelipe Balbi <balbi@ti.com>
Tested-by: NFelipe 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 16682c86
......@@ -431,8 +431,10 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
rtc_write(0, OMAP_RTC_INTERRUPTS_REG);
/* enable RTC functional clock */
if (id_entry->driver_data & OMAP_RTC_HAS_32KCLK_EN)
rtc_writel(OMAP_RTC_OSC_32KCLK_EN, OMAP_RTC_OSC_REG);
if (id_entry->driver_data & OMAP_RTC_HAS_32KCLK_EN) {
reg = rtc_read(OMAP_RTC_OSC_REG);
rtc_writel(reg | OMAP_RTC_OSC_32KCLK_EN, OMAP_RTC_OSC_REG);
}
/* clear old status */
reg = rtc_read(OMAP_RTC_STATUS_REG);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册