RFC: rtc: rv8803: avoid bootloop on low voltage of button cell
PATCH 1/1 RFC: rtc: rv8803: avoid bootloop on low voltage of button cell
if the rtc button cell is on low voltage this can result in a permanent bootloop in u-boot because V2F Register is permanent set.
### Warning: temperature compensation has stopped
### Warning: Voltage low, data is invalid
resetting ...
With this patch the bootloop is prevented
--- drivers/rtc/rv8803.c | 1 - 1 file changed, 1 deletion(-)
drivers/rtc/rv8803.c +0 -1
@@ -79,7 +79,6 @@ static int rv8803_rtc_get(struct udevice *dev, struct rtc_time *tm)if (flags &RTC_FLAG_BIT_V2F ) {printf ("### Warning: Voltage low, data is invalid\n" ); -return -1 ; } ret =dm_i2c_read (dev,0 , buf,sizeof (buf));
Signature · 1 line
2.17.1
Am 2023-02-08 08:38, schrieb Oliver Graute:
Quoted 10 lines
if the rtc button cell is on low voltage this can result in a permanent bootloop in u-boot because V2F Register is permanent set.
### Warning: temperature compensation has stopped
### Warning: Voltage low, data is invalid
resetting ...With this patch the bootloop is prevented
Signed-off-by Oliver Graute <[email protected]>
I'm curious, how is the call tree here? I don't see the dm_rtc_get() being called during boot. Basically, you are now just ignoring the error.
-michael
Quoted 12 lines
Am 08.02.2023 um 09:32 schrieb Michael Walle <[email protected]>:
Am 2023-02-08 08:38, schrieb Oliver Graute:
Quoted 7 lines
if the rtc button cell is on low voltage this can result in a permanent bootloop in u-boot because V2F Register is permanent set. ### Warning: temperature compensation has stopped
### Warning: Voltage low, data is invalid
resetting ...
With this patch the bootloop is preventedSigned-off-by Oliver Graute <[email protected]>
Quoted 2 lines
I'm curious, how is the call tree here? I don't see the
dm_rtc_get()being called during boot. Basically, you are now just ignoring the error.
I use dm_rtc_get() in a modified boot/bootm.c to check for a End-Off Live booting date. Just to prevent that testers uses devices with out-dated images.
So if this only affects me so this patch can be ignored.
Best regards,
Oliver
Am 2023-02-08 12:29, schrieb Oliver Graute:
Quoted 11 lines
Quoted 11 lines
Am 08.02.2023 um 09:32 schrieb Michael Walle <[email protected]>:
Am 2023-02-08 08:38, schrieb Oliver Graute:
Quoted 7 lines
if the rtc button cell is on low voltage this can result in a permanent bootloop in u-boot because V2F Register is permanent set. ### Warning: temperature compensation has stopped
### Warning: Voltage low, data is invalid
resetting ...
With this patch the bootloop is preventedSigned-off-by Oliver Graute <[email protected]>
Quoted 7 lines
Quoted 2 lines
I'm curious, how is the call tree here? I don't see the
dm_rtc_get()being called during boot. Basically, you are now just ignoring the error.I use
dm_rtc_get()in a modifiedboot/bootm.cto check for a End-Off Live booting date. Just to prevent that testers uses devices with out-dated images.So if this only affects me so this patch can be ignored.
In this case you should just ignore the return value (and live with bogus values). Or.. handle it gracefully.
-michael