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
(cherry picked from commit e2386f18eca2f6f75f7c5c2d49d603e3d2674509)

Details

Provenance
t_uemura_macome.co.jpAuthored on Nov 4 2022, 9:49 PM
impCommitted on Nov 4 2022, 9:50 PM
Parents
rG0156c3f1f760: if_vxlan(4): Check the size of data available in mbuf before using them
Branches
Unknown
Tags
Unknown

Event Timeline