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-next>] [day] [month] [year] [list]
Date:   Fri,  8 Nov 2019 18:01:35 +0100
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     linux-clk@...r.kernel.org, linux-rtc@...r.kernel.org
Cc:     Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Russell King <linux@...linux.org.uk>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>, linux-kernel@...r.kernel.org,
        kernel@...labora.com,
        Sebastian Reichel <sebastian.reichel@...labora.com>
Subject: [RFCv1] rtc: m41t80: disable clock provider support

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.

Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.com>
---
Hi,

This is a downstream workaround/hack for the issue described in the
commit message. I would like to upstream a board based on Congatec's
QMX6, which requires a proper solution for this. Do you think it
would be ok to have an always-on flag for clocks similar to regulators?

-- Sebastian
---
 drivers/rtc/rtc-m41t80.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
index 5f46f85f814b..81743d93d03e 100644
--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -973,7 +973,7 @@ static int m41t80_probe(struct i2c_client *client,
 		}
 	}
 #endif
-#ifdef CONFIG_COMMON_CLK
+#if 0
 	if (m41t80_data->features & M41T80_FEATURE_SQ)
 		m41t80_sqw_register_clk(m41t80_data);
 #endif
-- 
2.24.0.rc1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ