HomeFreeBSD

Do not give up if writing to the chip's control and status registers fails

Description

Do not give up if writing to the chip's control and status registers fails
during startup. When a brand new chip leaves the factory, it is in a
special power-saving mode that disables most functions on the chip to
save battery power. The chip is stuck in this mode until the first write
to the time registers, which automatically clears the special power-saving
mode and starts the oscillator.

Also, the day-of-week register in this chip counts 1-7, not 0-6, so write
the values accordingly.

These changes are based on the patch submitted by Brian Scott, but I
elimated warnings since this condition is expected, and added some comments,
and so in general blame me for any mistakes.

PR: 223642

Details

Provenance
ianAuthored on
Parents
rS326749: wc(1): Restore regular file char count fast path
Branches
Unknown
Tags
Unknown