After writing the magic words to the KICK0 and KICK1 registers, we must
wait for a 1 in the unlock field of the general control register to
signify when the rtc device is in an unlocked state.
Signed-off-by: Bryan Brattlof <[email protected]>
---
drivers/rtc/rtc-ti-k3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-ti-k3.c b/drivers/rtc/rtc-ti-k3.c
index 7a0f181d3fefe..fd26be7868d25 100644
--- a/drivers/rtc/rtc-ti-k3.c
+++ b/drivers/rtc/rtc-ti-k3.c
@@ -190,7 +190,7 @@ static int k3rtc_unlock_rtc(struct ti_k3_rtc *priv)
/* Skip fence since we are going to check the unlock bit as fence */
ret = regmap_field_read_poll_timeout(priv->r_fields[K3RTC_UNLOCK], ret,
- !ret, 2, priv->sync_timeout_us);
+ ret, 2, priv->sync_timeout_us);
return ret;
}
--
2.17.1
On Tue, 16 Aug 2022 12:33:11 -0500, Bryan Brattlof wrote:
> After writing the magic words to the KICK0 and KICK1 registers, we must
> wait for a 1 in the unlock field of the general control register to
> signify when the rtc device is in an unlocked state.
>
>
Applied, thanks!
[1/2] rtc: k3: wait until the unlock field is not zero
commit: f2c5671a64d2a79341e8ee45d5933f6a76960189
[2/2] rtc: k3: detect SoC to determine erratum fix
commit: 1e2585b49d849196f359bbf86677943fe2d80afe
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com