voltage sense wired. So, disable it and force the card to 5V by default.
Also, recode the hack to use the "direct Vcc" feature of the chip, letting
it manage the voltage directly, as this is supported on both the 296 and
396.
PCIC_VENDOR_NONE: New.
PCIC_VENDOR_CIRRUS_*: Collapse the 2 chips into one vendor ID.
pcic_ident_ok(): Check the ID revision field -- if it's 0, punt.
pcic_vendor(): Check the ID revision field -- if it's 0, or the ID register
is all-1s, assume there is no chip present. (Previously this would return
"Unknown controller" -- which, AFAICT, *never* resulted in a working device.)
Do the Cirrus check only after verifying that we got the Intel ID.
pcic_attach(): Use a priori knowledge of the Cirrus chips to determine the
number of sockets rather than trying (unsuccessfully) to probe. Also, just
blast all of PCIC_INTR -- we do this in pcic_deactivate_card() anyway.
- implement SIMPLEQ_REMOVE(head, elm, type, field). whilst it's O(n),
this mirrors the functionality of SLIST_REMOVE() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
that Charles added in rev 1.58. Not only is it good programming practice
to explain magic, but code that looks like:
reg = pcic_read(h, PCIC_IDENT);
reg = pcic_read(h, PCIC_IDENT);
is _gonna_ be interpreted as a cut-n-paste error by someone eventually.
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.
The old timeout()/untimeout() API has been removed from the kernel.
handling. This is important when multiple cards are present when
the system boots, as we use tsleep now instead of delay in various
places (delay used to provide serialization by virtue of not causing
a context switch).
some period between disable and enable in spec, but is done in
pcic_chip_socket_disable. And we also disable socket in pcic_deactivate_card,
we should do it in another way if it is really necessary.
- Shorten the wait message so that ps(1) and ps in ddb be happy.
- Replace newly added long delay with sleep.