lkml.org 
[lkml]   [2015]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [rtc-linux] [PATCH] rtc: OMAP: Add external 32k clock feature
On Tue, 3 Mar 2015 15:12:02 +0530 Keerthy <j-keerthy@ti.com> wrote:

> Add external 32k clock feature. The internal clock will be gated during suspend.
> Hence make use of the external 32k clock so that rtc is functional accross
> suspend/resume.
>
> ...
>
> @@ -446,6 +449,7 @@ static const struct omap_rtc_device_type omap_rtc_default_type = {
>
> static const struct omap_rtc_device_type omap_rtc_am3352_type = {
> .has_32kclk_en = true,
> + .has_osc_ext_32k = true,
> .has_kicker = true,
> .has_irqwakeen = true,
> .has_pmic_mode = true,
> @@ -543,7 +547,16 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
> if (rtc->type->has_32kclk_en) {
> reg = rtc_read(rtc, OMAP_RTC_OSC_REG);
> rtc_writel(rtc, OMAP_RTC_OSC_REG,
> - reg | OMAP_RTC_OSC_32KCLK_EN);
> + reg | OMAP_RTC_OSC_32KCLK_EN);
> + }
> +
> + /* Enable External clock as the source */
> +
> + if (rtc->type->has_osc_ext_32k) {
> + rtc_writel(rtc, OMAP_RTC_OSC_REG,
> + (OMAP_RTC_OSC_EXT_32K |
> + rtc_read(rtc, OMAP_RTC_OSC_REG)) &
> + (~OMAP_RTC_OSC_OSC32K_GZ));
> }

How do we know that all systems have this external clock and that it
works OK?


\
 
 \ /
  Last update: 2015-03-25 00:41    [W:0.082 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site