* [PATCH] rtc: jz4740: fix loading of rtc driver
@ 2017-09-18 19:10 Mathieu Malaterre
2017-10-12 12:32 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Malaterre @ 2017-09-18 19:10 UTC (permalink / raw)
To: Ralf Baechle
Cc: Alex Smith, Mathieu Malaterre, Zubair Lutfullah Kakakhel,
Alessandro Zummo, Alexandre Belloni, linux-rtc, linux-kernel
The current timeout for waiting for WRDY is not always sufficient. Always
increase it to 10000 even on JZ4740. This is technically only required on
JZ4780, where the current symptoms seen after a hard reboot are:
jz4740-rtc 10003000.rtc: rtc core: registered 10003000.rtc as rtc0
jz4740-rtc 10003000.rtc: Could not write to RTC registers
jz4740-rtc: probe of 10003000.rtc failed with error -5
Suggested-by: Alex Smith <alex.smith@imgtec.com>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
drivers/rtc/rtc-jz4740.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
index c9536fb0ba4a..ff65a7d2b9c9 100644
--- a/drivers/rtc/rtc-jz4740.c
+++ b/drivers/rtc/rtc-jz4740.c
@@ -82,7 +82,7 @@ static inline uint32_t jz4740_rtc_reg_read(struct jz4740_rtc *rtc, size_t reg)
static int jz4740_rtc_wait_write_ready(struct jz4740_rtc *rtc)
{
uint32_t ctrl;
- int timeout = 1000;
+ int timeout = 10000;
do {
ctrl = jz4740_rtc_reg_read(rtc, JZ_REG_RTC_CTRL);
@@ -94,7 +94,7 @@ static int jz4740_rtc_wait_write_ready(struct jz4740_rtc *rtc)
static inline int jz4780_rtc_enable_write(struct jz4740_rtc *rtc)
{
uint32_t ctrl;
- int ret, timeout = 1000;
+ int ret, timeout = 10000;
ret = jz4740_rtc_wait_write_ready(rtc);
if (ret != 0)
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtc: jz4740: fix loading of rtc driver
2017-09-18 19:10 [PATCH] rtc: jz4740: fix loading of rtc driver Mathieu Malaterre
@ 2017-10-12 12:32 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2017-10-12 12:32 UTC (permalink / raw)
To: Mathieu Malaterre
Cc: Ralf Baechle, Alex Smith, Zubair Lutfullah Kakakhel,
Alessandro Zummo, linux-rtc, linux-kernel
On 18/09/2017 at 21:10:13 +0200, Mathieu Malaterre wrote:
> The current timeout for waiting for WRDY is not always sufficient. Always
> increase it to 10000 even on JZ4740. This is technically only required on
> JZ4780, where the current symptoms seen after a hard reboot are:
>
> jz4740-rtc 10003000.rtc: rtc core: registered 10003000.rtc as rtc0
> jz4740-rtc 10003000.rtc: Could not write to RTC registers
> jz4740-rtc: probe of 10003000.rtc failed with error -5
>
> Suggested-by: Alex Smith <alex.smith@imgtec.com>
> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
> drivers/rtc/rtc-jz4740.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Applied, thanks.
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-12 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-18 19:10 [PATCH] rtc: jz4740: fix loading of rtc driver Mathieu Malaterre
2017-10-12 12:32 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).