HomeFreeBSD

nxprtc: Fix timing issue with register access.

Description

nxprtc: Fix timing issue with register access.

My Adafruit PCF8523 RTC on either RPi2B or RPi3B+ failed to work around
80 ~ 90 % of boot-ups, by printing the following log lines.

nxprtc0: <NXP PCF8523 RTC> at addr 0xd0 on iicbus0
nxprtc0: cannot set up timer
Warning: no time-of-day clock registered, system time will not be set accurately

This is due to pcf8523_start_timer(sc) returned non-zero in
nxprtc_start() due to a register read failure of PCF8523_R_TMR_A_FREQ or
PCF8523_R_TMR_CLKOUT or a failure to program a new value.

The pause_sbt("nxpbat") sleep was too short and caused the register
access failures.

PR: 266093

Details

Provenance
t_uemura_macome.co.jpAuthored on Sep 14 2022, 1:34 PM
impCommitted on Sep 14 2022, 1:34 PM
Parents
rGb94e19266007: Capitalize title like in all other titles.
Branches
Unknown
Tags
Unknown