Existing code recognizes the mcp7941x RTC, but this RTC has an
enable bit at the same location as the "Clock Halt" bit on the ds1307, with an
opposite assertion (set == on, whereas CH set == clock stopped). Thus the
current code halts the clock, with no way to enable it.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 12503 Build 12778: arc lint + arc unit
Event Timeline
sys/dev/iicbus/ds1307.c | ||
---|---|---|
300 | You must never start a stopped RTC oscillator in the attach/init code, because it clears the time-is-invalid indication and the first attempt to read time from the RTC will return garbage as if it were valid. The reason this bit lives in the seconds register on many rtc chips is that when you eventually write a valid time to the chip, that also automatically starts the oscillator and clears the time-is-invalid status. |
Comment Actions
Drop the enable part, it doesn't make sense. This changes the revision to instead just add the mcp7941x enable bit.