lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 07 Apr 2015 10:06:52 +0300
From:	Igor Grinberg <grinberg@...pulab.co.il>
To:	Keerthy <a0393675@...com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	rtc-linux@...glegroups.com
CC:	Keerthy <j-keerthy@...com>, a.zummo@...ertech.it,
	linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org
Subject: Re: [rtc-linux] [PATCH] rtc: OMAP: Add external 32k clock feature

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@...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.
There are dozens of boards out there that do not have the external
oscillator assembled.

Am I missing something?

-- 
Regards,
Igor.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ