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]
Message-ID: <20191108223415.dio3pwkf24jfs5o4@earth.universe>
Date:   Fri, 8 Nov 2019 23:34:15 +0100
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc:     linux-clk@...r.kernel.org, linux-rtc@...r.kernel.org,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Russell King <linux@...linux.org.uk>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>, linux-kernel@...r.kernel.org,
        kernel@...labora.com
Subject: Re: [RFCv1] rtc: m41t80: disable clock provider support

Hi,

On Fri, Nov 08, 2019 at 06:53:29PM +0100, Alexandre Belloni wrote:
> On 08/11/2019 18:01:35+0100, Sebastian Reichel wrote:
> > Congatec's QMX6 system on module (SoM) uses a m41t62 as RTC. The
> > modules SQW clock output defaults to 32768 Hz. This behaviour is
> > used to provide the i.MX6 CKIL clock. Once the RTC driver is probed,
> > the clock is disabled and all i.MX6 functionality depending on
> > the 32 KHz clock have undefined behaviour (e.g. the hardware watchdog
> > run to fast or slow).
> > 
> > The normal solution would be to properly describe the clock tree
> > in DT, but from the kernel's perspective this is a chicken-and-egg
> > problem: CKIL is required very early, but the clock is only provided
> > after the I2C RTC has been probed.
> > 
> > Technically everything is fine by not touching anything, so this
> > works around the issue by disabling the clock handling from the
> > RTC driver. I guess the proper solution would be to simply mark the
> > clock as always-enabled, but this does not seem to be supported by
> > the clock framework.
> > 
> 
> You need to have a consumer so this clock is not disabled by the CCF
> after seeing nobody uses it.

That's why I was wondering if we can have something like regulator's
always-enabled for clocks.

> If you need it early, you can have a look at rtc-sun6i.c but I
> would like that to not become a recurrent pattern, especially for
> discrete RTCs.

I don't just need it early. The issue is, that CKIL is the 32khz
low frequency clock fed into the i.MX6. It is initialized by the
clock manager, so I need it before any of the SoC clocks are
registered. Without the SoC clocks, the I2C bus cannot be probed
and thus the RTC driver cannot be probed.

-- Sebastian

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ