From: Keerthy <a0393675@ti.com>
To: Igor Grinberg <grinberg@compulab.co.il>,
Andrew Morton <akpm@linux-foundation.org>,
<rtc-linux@googlegroups.com>
Cc: Keerthy <j-keerthy@ti.com>, <a.zummo@towertech.it>,
<linux-kernel@vger.kernel.org>, <linux-omap@vger.kernel.org>
Subject: Re: [rtc-linux] [PATCH] rtc: OMAP: Add external 32k clock feature
Date: Fri, 10 Apr 2015 13:56:54 +0530 [thread overview]
Message-ID: <5527894E.9000807@ti.com> (raw)
In-Reply-To: <5523820C.2010709@compulab.co.il>
Hi
On Tuesday 07 April 2015 12:36 PM, Igor Grinberg wrote:
> Hi,
>
> On 04/07/15 06:29, Keerthy wrote:
>> Hi Andrew,
>>
>> Apologies for replying late.
>>
>> On Wednesday 25 March 2015 04:29 AM, Andrew Morton wrote:
>>> 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?
>>>
>>
>> AM335 and AM43X have the external clock feature which we choose using
>> RTC_OSC_REG. I verified it works OK by seeing the RTC seconds ticking
>> even after switching the source to the external 32k Clock.
>
> AFAIU, this is related to the external (outside of SoC) oscillator, right?
> If so, there is a possibility to not assemble it on the board (at least
> on AM335) and use the internal clock source instead.
Yes. The register 'OMAP_RTC_OSC_REG' is part of the RTC IP register set
so i assumed that it would be with the RTCs of those particular SoCs.
> There are dozens of boards out there that do not have the external
> oscillator assembled.
>
> Am I missing something?
>
Regards,
Keerthy
--
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2015-04-10 8:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1425375722-13412-1-git-send-email-j-keerthy@ti.com>
[not found] ` <20150324155916.cfd1b7ab442271466160283f@linux-foundation.org>
2015-04-07 3:29 ` [rtc-linux] [PATCH] rtc: OMAP: Add external 32k clock feature Keerthy
2015-04-07 7:06 ` Igor Grinberg
2015-04-10 8:26 ` Keerthy [this message]
2015-04-10 20:37 ` Andrew Morton
2015-04-10 22:23 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5527894E.9000807@ti.com \
--to=a0393675@ti.com \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=grinberg@compulab.co.il \
--cc=j-keerthy@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox