This allows to remove a bunch of low level code.
Also, superio(4) provides safer interaction with other drivers
that work with Super I/O configuration registers.
Details
- Reviewers
bz delphij mav - Group Reviewers
manpages - Commits
- rS353645: wbwd: move to superio(4) bus
Tested only on PCengines APU2:
superio0: <Nuvoton NCT5104D/NCT6102D/NCT6106D (rev. B+)> at port 0x2e-0x2f on isa0
wbwd0: <Nuvoton NCT6102 (0xc4/0x53) Watchdog Timer> at WDT ldn 0x08 on superio0
The watchdog output is incorrectly wired on that system and the watchdog
does not really do it its job, but the pulse can be seen with a signal
analyzer.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Looks fine to me, but I no longer have the hardware to actually test the changes, iXsystems may be able to help with that.
There are a few minor nits (commented inline) and these are all optional (most of these are style changes), the only real ask from me is to provide some level of visibility when the probed device is unsupported, at least in bootverbose mode instead of a silent ENXIO return.
sys/dev/wbwd/wbwd.c | ||
---|---|---|
6 ↗ | (On Diff #63144) | [OPTIONAL ]The change was close to 1/2 and you deserve to be added here. |
313 ↗ | (On Diff #63144) | [OPTIONAL] This whole block is not really used and can probably be removed altogether. |
467 ↗ | (On Diff #63144) | OPTIONAL: style(9) wants variables to be ordered by size, then in alphabetical order, so this should be: uint8_t devid, revid; Note that 'found' is unused and can be removed. I'd probably replace 'j' with 'i' since i no longer exist. |
492 ↗ | (On Diff #63144) | OPTIONAL: It's probably worthy to print out the dev_id and dev_rev here in bootverbose? |
507 ↗ | (On Diff #63144) | OPTIONAL: I'd probably refactor this to a switch/case, but I'm fine with the code as-is too. |
sys/dev/wbwd/wbwd.c | ||
---|---|---|
467 ↗ | (On Diff #63144) | FWIW, I always read that style(9) guideline as saying that larger variables should come first. |