Home | History | Annotate | only in /src/sys/dev/ofisa
History log of /src/sys/dev/ofisa
RevisionDateAuthorComments
 1.2 11-Apr-2001  jdolecek Only install headers which are actually used by our userland. This
saves about 2.2MB under /usr/include/dev/. Discussed on tech-kern@
recently.

I HOPE to get the list right. The headers I left in are ones
used for MI tools and those whose usage I discovered by grep over tree sources.
Feel free to put needed includes back in if you encounter anything which
should not be removed from lists.
 1.1 12-Jun-1998  cgd branches: 1.1.14; 1.1.26;
Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
 1.1.26.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.14.1 21-Apr-2001  bouyer Sync with HEAD
 1.14 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.13 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.12 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.11 19-Jan-2021  thorpej of_compatible() is a hokey API (returning -1 for no match) and nothing
here relies on its reverse-index return value semantics, so just use
of_match_compat_data() instead.
 1.10 28-Apr-2008  martin branches: 1.10.102;
Remove clause 3 and 4 from TNF licenses
 1.9 16-Apr-2008  cegger branches: 1.9.2; 1.9.4;
device_t / softc split. From Hans Rosenfeld.
 1.8 15-Apr-2008  cegger device_t / softc split. From Hans Rosenfeld
 1.7 08-Apr-2008  cegger use aprint_*_dev and device_xname
 1.6 19-Oct-2007  ad branches: 1.6.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.5 04-Mar-2007  christos branches: 1.5.2; 1.5.14; 1.5.16; 1.5.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.4 29-Mar-2006  thorpej branches: 1.4.14;
Use device_private().
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.6; 1.3.8; 1.3.10; 1.3.12;
merge ktrace-lwp.
 1.2 27-Feb-2005  perry branches: 1.2.4;
nuke trailing whitespace
 1.1 28-Jan-2004  jdolecek branches: 1.1.4; 1.1.10; 1.1.12;
ofisa atppc(4) attachment
test-compiled with Shark GENERIC (with atppc* at ofisa? added), otherwise
untested
 1.1.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.10.1 29-Apr-2005  kent sync with -current
 1.1.4.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 28-Jan-2004  skrll file atppc_ofisa.c was added on branch ktrace-lwp on 2004-08-03 10:49:05 +0000
 1.2.4.3 27-Oct-2007  yamt sync with head.
 1.2.4.2 03-Sep-2007  yamt sync with head.
 1.2.4.1 21-Jun-2006  yamt sync with head.
 1.3.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.3.10.1 19-Apr-2006  elad sync with head.
 1.3.8.1 01-Apr-2006  yamt sync with head.
 1.3.6.1 22-Apr-2006  simonb Sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.4.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.5.20.1 25-Oct-2007  bouyer Sync with HEAD.
 1.5.16.1 06-Nov-2007  matt sync with HEAD
 1.5.14.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.5.2.1 23-Oct-2007  ad Sync with head.
 1.6.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.4.1 16-May-2008  yamt sync with head.
 1.9.2.1 18-May-2008  yamt sync with head.
 1.10.102.1 03-Apr-2021  thorpej Sync with HEAD.
 1.20 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.19 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.18 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.17 19-Jan-2021  thorpej of_compatible() is a hokey API (returning -1 for no match) and nothing
here relies on its reverse-index return value semantics, so just use
of_match_compat_data() instead.
 1.16 08-Dec-2018  thorpej branches: 1.16.12;
Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.15 27-Oct-2012  chs branches: 1.15.36; 1.15.38;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.14 08-Apr-2008  cegger branches: 1.14.38; 1.14.48;
use aprint_*_dev and device_xname
 1.13 14-Mar-2008  cube Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend). Use proper types and ansify where appropriate.
 1.12 19-Oct-2007  ad branches: 1.12.12; 1.12.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.11 13-Jul-2006  gdamore branches: 1.11.14; 1.11.28; 1.11.30; 1.11.34;
Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@. Fixes PR port-evbmips/32362.
 1.10 29-Mar-2006  thorpej branches: 1.10.4;
Use device_private().
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 04-Feb-2005  perry branches: 1.8.6;
de-__P
 1.7 02-Oct-2002  thorpej branches: 1.7.6; 1.7.14; 1.7.16;
Add trailing ; to CFATTACH_DECL.
 1.6 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 08-Jun-2002  yamt constify and make auto const variables static.
 1.3 13-Nov-2001  lukem branches: 1.3.8;
add RCSIDs
 1.2 21-Mar-1998  cgd branches: 1.2.26; 1.2.28;
compile with -Wall, update for changes to dev/ofw
 1.1 07-Feb-1998  cgd initial implementation of OFW ISA bus code and attachments for a few
devices. Still a bit rough, but works well enough. Requires a bunch of
machine-dependent glue (since this is, in effect, a MI bus bridge).
 1.2.28.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.28.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.28.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.26.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.26.2 20-Jun-2002  nathanw Catch up to -current.
 1.2.26.1 14-Nov-2001  nathanw Catch up to -current.
 1.3.8.1 20-Jun-2002  gehenna catch up with -current.
 1.7.16.1 12-Feb-2005  yamt sync with head.
 1.7.14.1 29-Apr-2005  kent sync with -current
 1.7.6.1 04-Feb-2005  skrll Sync with HEAD.
 1.8.6.4 17-Mar-2008  yamt sync with head.
 1.8.6.3 27-Oct-2007  yamt sync with head.
 1.8.6.2 30-Dec-2006  yamt sync with head.
 1.8.6.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 19-Apr-2006  elad sync with head.
 1.9.8.2 11-Aug-2006  yamt sync with head
 1.9.8.1 01-Apr-2006  yamt sync with head.
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.10.4.3 17-Jun-2006  gdamore Undo the undo. Restore COM_INIT_REGS.
 1.10.4.2 17-Jun-2006  gdamore Revert COM_INIT_REGS.
 1.10.4.1 16-Jun-2006  gdamore More com(4) variants that I missed earlier. Thanks to tsutsui@ for pointing
this out.
 1.11.34.1 25-Oct-2007  bouyer Sync with HEAD.
 1.11.30.2 23-Mar-2008  matt sync with HEAD
 1.11.30.1 06-Nov-2007  matt sync with HEAD
 1.11.28.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.11.14.1 23-Oct-2007  ad Sync with head.
 1.12.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.12.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.12.12.1 24-Mar-2008  keiichi sync with head.
 1.14.48.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.38.1 30-Oct-2012  yamt sync with head
 1.15.38.1 10-Jun-2019  christos Sync with HEAD
 1.15.36.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.16.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.32 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.31 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.30 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.29 19-Jan-2021  thorpej of_compatible() is a hokey API (returning -1 for no match) and nothing
here relies on its reverse-index return value semantics, so just use
of_match_compat_data() instead.
 1.28 08-May-2019  isaki branches: 1.28.10;
Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.27 09-Dec-2016  christos branches: 1.27.16; 1.27.20;
Factor our model printing code; use aprint; eliminate alloca.
 1.26 09-Dec-2016  christos don't use alloca
 1.25 22-May-2010  tsutsui branches: 1.25.18; 1.25.36; 1.25.40;
Split device_t/softc. Based on patch from cegger@.
ess_pnpbios.c and ess_ofisa.c fixes by me.

Tested on ess_isapnp.c, and no crash with ess_ofisa.c on shark.
 1.24 12-May-2009  cegger branches: 1.24.2; 1.24.4;
struct device * -> device_t, no functional changes intended.
 1.23 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.22 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.21 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.20 28-Apr-2008  martin branches: 1.20.8; 1.20.14;
Remove clause 3 and 4 from TNF licenses
 1.19 08-Apr-2008  cegger branches: 1.19.2; 1.19.4;
use aprint_*_dev and device_xname
 1.18 19-Oct-2007  ad branches: 1.18.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.17 29-Mar-2006  thorpej branches: 1.17.18; 1.17.32; 1.17.34; 1.17.38;
Use device_private().
 1.16 11-Dec-2005  christos branches: 1.16.4; 1.16.6; 1.16.8; 1.16.10; 1.16.12;
merge ktrace-lwp.
 1.15 27-Feb-2005  perry branches: 1.15.4;
nuke trailing whitespace
 1.14 04-Feb-2005  perry de-__P
 1.13 04-Aug-2004  drochner branches: 1.13.4; 1.13.6;
adapt for changed essattach() signature
 1.12 03-May-2003  wiz branches: 1.12.2;
DMA, not dma nor Dma.
 1.11 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.10 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 08-Jun-2002  yamt constify and make auto const variables static.
 1.7 13-Nov-2001  lukem branches: 1.7.8;
add RCSIDs
 1.6 06-Jan-2001  nathanw branches: 1.6.2; 1.6.4;
Do ess_config_addr() in the ofisa front end, rather than in the match
routine. Prevents problems with non-SCR ess chips, as described in
PR 11630.
 1.5 16-Mar-1999  mycroft branches: 1.5.8; 1.5.18;
Adjustments for structure name changes.
 1.4 13-Aug-1998  eeh Merge paddr_t changes into the main branch.
 1.3 31-Jul-1998  augustss branches: 1.3.2;
Major cleanup of the ESS driver. It now sorta works. More to come.
 1.2 30-Jul-1998  thorpej Use the correct "compatible" strings (ESS, not generic SB!), and correct
some comments about what we expect as far as interrupt and dma properties.
 1.1 30-Jul-1998  augustss ESS attachments for ofisa.
 1.3.2.2 08-Aug-1998  eeh Revert cdevsw mmap routines to return int.
 1.3.2.1 31-Jul-1998  eeh file ess_ofisa.c was added on branch eeh-paddr_t on 1998-08-08 03:06:49 +0000
 1.5.18.1 25-Jan-2001  jhawk Pull up revision 1.6 (requested by nathanw):
Support certain ISAPnP ESS 1868 and 1869 cards. Per PR port-i386/11630.
 1.5.8.1 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.6.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.6.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.6.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.6.2.1 14-Nov-2001  nathanw Catch up to -current.
 1.7.8.1 20-Jun-2002  gehenna catch up with -current.
 1.12.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.12.2.4 04-Feb-2005  skrll Sync with HEAD.
 1.12.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.12.2.1 12-Aug-2004  skrll Sync with HEAD.
 1.13.6.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.13.6.1 12-Feb-2005  yamt sync with head.
 1.13.4.1 29-Apr-2005  kent sync with -current
 1.15.4.2 27-Oct-2007  yamt sync with head.
 1.15.4.1 21-Jun-2006  yamt sync with head.
 1.16.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.16.10.1 19-Apr-2006  elad sync with head.
 1.16.8.1 01-Apr-2006  yamt sync with head.
 1.16.6.1 22-Apr-2006  simonb Sync with head.
 1.16.4.1 09-Sep-2006  rpaulo sync with head
 1.17.38.1 25-Oct-2007  bouyer Sync with HEAD.
 1.17.34.1 06-Nov-2007  matt sync with HEAD
 1.17.32.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.17.18.1 23-Oct-2007  ad Sync with head.
 1.18.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.19.4.4 11-Aug-2010  yamt sync with head.
 1.19.4.3 16-May-2009  yamt sync with head
 1.19.4.2 04-May-2009  yamt sync with head.
 1.19.4.1 16-May-2008  yamt sync with head.
 1.19.2.1 18-May-2008  yamt sync with head.
 1.20.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.20.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.24.4.1 30-May-2010  rmind sync with head
 1.24.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.25.40.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.25.36.1 05-Feb-2017  skrll Sync with HEAD
 1.25.18.1 03-Dec-2017  jdolecek update from HEAD
 1.27.20.2 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.27.20.1 03-May-2019  isaki Remove dev/auconv.[ch].
Now it is handled in dev/audio/audio.c and dev/audio/linear.c.
Remove dev/mulaw.h.
It already have been just a link to dev/audio/mulaw.h in this
branch.
 1.27.16.1 10-Jun-2019  christos Sync with HEAD
 1.28.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.16 30-Apr-2021  thorpej Allow devices to declare themselves an "ofisa_subclass", allowing
that device to beat "ofisa" in match, but then attach an "ofisa"
instance as a logical child at the same OFW node.
 1.15 27-Apr-2021  thorpej "ofisa" carried an "ofbus" interface attribute in addition to its own
in order to attach an "ofrtc" instance. This worked prior to the
autconfiguration system enforcing non-ambiguous interface attribute
specificaitons due to how the attach args for ofisa were structured.

But it no longer works, and is a big dodgy barring a formalized "subclassing"
facility for interface atributes in config(5).

So, stop using "ofrtc" on Shark, and replace it with an ofisa driver for
the mc146818 real time clock hardware, and remove "ofbus" from "ofisa".
 1.14 11-Dec-2005  christos branches: 1.14.182;
merge ktrace-lwp.
 1.13 31-Jan-2004  jdolecek add dependency on isadma for atppc attachments
add atppc_isadma.c for atppc@isapnp and atppc@ofisa, too
 1.12 28-Jan-2004  jdolecek ofisa atppc(4) attachment
test-compiled with Shark GENERIC (with atppc* at ofisa? added), otherwise
untested
 1.11 26-Nov-2001  yamt branches: 1.11.16;
move dev/isa/cs89x0{.c,{var,reg}.h} into dev/ic
and split isadma parts into /dev/isa/cs89x0isa*.
 1.10 26-Feb-2001  matt branches: 1.10.2; 1.10.4;
Add pckbc attachment so we can get wscons on the dnard.
 1.9 20-Aug-1998  thorpej branches: 1.9.12;
Add ofisa attachment for the ISA joystick driver.
XXX currently arm32-specific.
 1.8 30-Jul-1998  thorpej Uncomment the SoundBlaster ofisa attachment; the Shark isn't the only
potenial user of ofisa (e.g. my FirePower). An ofisa attachment for the
SoundBlaster is prefectly legitimate.
 1.7 30-Jul-1998  augustss A first stab at making the SHARK sound work. It doesn't really work
yet, but it probes and makes a noise when used. Stay tuned!
 1.6 27-Jul-1998  thorpej branches: 1.6.2;
ISA with OpenFirmware configuration glue for the CS8900 Ethernet driver.
 1.5 08-Jul-1998  thorpej Declare the ofisa soundblaster attachment.
 1.4 21-Mar-1998  cgd compile with -Wall, update for changes to dev/ofw
 1.3 16-Feb-1998  thorpej Remove "class" declarations, and add "devclass" declarations where
appropriate. Fix several inconsistencies between device class and
attributes. Mostly from Chris Demetriou.
 1.2 07-Feb-1998  cgd don't forget class spec
 1.1 07-Feb-1998  cgd initial implementation of OFW ISA bus code and attachments for a few
devices. Still a bit rough, but works well enough. Requires a bunch of
machine-dependent glue (since this is, in effect, a MI bus bridge).
 1.6.2.1 08-Aug-1998  eeh Revert cdevsw mmap routines to return int.
 1.9.12.1 12-Mar-2001  bouyer Sync with HEAD.
 1.10.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.2.1 08-Jan-2002  nathanw Catch up to -current.
 1.11.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.16.1 03-Aug-2004  skrll Sync with HEAD
 1.14.182.1 13-May-2021  thorpej Sync with HEAD.
 1.32 28-Apr-2021  thorpej Avoid a double "cs0: " in the autoconfiguration messages.
 1.31 27-Jan-2021  thorpej branches: 1.31.4;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.30 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.29 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.28 19-Jan-2021  thorpej of_compatible() is a hokey API (returning -1 for no match) and nothing
here relies on its reverse-index return value semantics, so just use
of_match_compat_data() instead.
 1.27 09-Dec-2016  christos branches: 1.27.30;
Factor our model printing code; use aprint; eliminate alloca.
 1.26 13-Apr-2015  riastradh branches: 1.26.2;
Convert sys/dev to use <sys/rndsource.h>.
 1.25 02-Feb-2012  tls branches: 1.25.6; 1.25.24;
Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
avoid expensive operations on disabled entropy sources; make the
rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
system events, and skew between clocks, with a sample implementation
for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.24 22-Sep-2009  tsutsui branches: 1.24.12; 1.24.16;
Make local functions static.
 1.23 22-Sep-2009  tsutsui Split device_t/softc. Tested only on cs at ofisa on shark.
 1.22 12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.21 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.20 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.19 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.18 28-Apr-2008  martin branches: 1.18.8; 1.18.14;
Remove clause 3 and 4 from TNF licenses
 1.17 08-Apr-2008  cegger branches: 1.17.2; 1.17.4;
use aprint_*_dev and device_xname
 1.16 19-Oct-2007  ad branches: 1.16.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.15 29-Mar-2006  thorpej branches: 1.15.18; 1.15.32; 1.15.34; 1.15.38;
Use device_private().
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.6; 1.14.8; 1.14.10; 1.14.12;
merge ktrace-lwp.
 1.13 04-Feb-2005  perry branches: 1.13.6;
de-__P
 1.12 01-Sep-2004  drochner branches: 1.12.4; 1.12.6;
one more case: don't use ISACF_* constants internally
 1.11 03-May-2003  wiz branches: 1.11.2;
DMA, not dma nor Dma.
 1.10 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.9 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 08-Jun-2002  yamt constify and make auto const variables static.
 1.6 26-Nov-2001  yamt branches: 1.6.8;
move dev/isa/cs89x0{.c,{var,reg}.h} into dev/ic
and split isadma parts into /dev/isa/cs89x0isa*.
 1.5 13-Nov-2001  lukem add RCSIDs
 1.4 26-Dec-2000  mycroft branches: 1.4.2; 1.4.4;
Um, we need rnd.h so that cs_softc is defined properly. Overrunning structures
is bad.
NOTE: #IFDEF IN SOFTC DEFINITIONS IS BAD.
 1.3 17-Aug-1998  thorpej branches: 1.3.12; 1.3.22;
Fix a typo.
 1.2 15-Aug-1998  thorpej Use _CS_OFISA_MD_* callbacks for old, broken OpenFirmware builds.
 1.1 27-Jul-1998  thorpej ISA with OpenFirmware configuration glue for the CS8900 Ethernet driver.
 1.3.22.1 25-Jan-2001  jhawk Pull up revision 1.4 (requested by mycroft):
Include <sys/rnd.h> as appropriate to properly size cs_softc.
 1.3.12.1 05-Jan-2001  bouyer Sync with HEAD
 1.4.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.4.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.4.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.4.2.1 14-Nov-2001  nathanw Catch up to -current.
 1.6.8.1 20-Jun-2002  gehenna catch up with -current.
 1.11.2.4 04-Feb-2005  skrll Sync with HEAD.
 1.11.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.11.2.1 03-Sep-2004  skrll Sync with HEAD
 1.12.6.1 12-Feb-2005  yamt sync with head.
 1.12.4.1 29-Apr-2005  kent sync with -current
 1.13.6.2 27-Oct-2007  yamt sync with head.
 1.13.6.1 21-Jun-2006  yamt sync with head.
 1.14.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.14.10.1 19-Apr-2006  elad sync with head.
 1.14.8.1 01-Apr-2006  yamt sync with head.
 1.14.6.1 22-Apr-2006  simonb Sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.15.38.1 25-Oct-2007  bouyer Sync with HEAD.
 1.15.34.1 06-Nov-2007  matt sync with HEAD
 1.15.32.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.15.18.1 23-Oct-2007  ad Sync with head.
 1.16.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.4.4 11-Mar-2010  yamt sync with head
 1.17.4.3 16-May-2009  yamt sync with head
 1.17.4.2 04-May-2009  yamt sync with head.
 1.17.4.1 16-May-2008  yamt sync with head.
 1.17.2.1 18-May-2008  yamt sync with head.
 1.18.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.24.16.1 18-Feb-2012  mrg merge to -current.
 1.24.12.1 17-Apr-2012  yamt sync with head
 1.25.24.2 05-Feb-2017  skrll Sync with HEAD
 1.25.24.1 06-Jun-2015  skrll Sync with HEAD
 1.25.6.1 03-Dec-2017  jdolecek update from HEAD
 1.26.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.27.30.1 03-Apr-2021  thorpej Sync with HEAD.
 1.31.4.1 13-May-2021  thorpej Sync with HEAD.
 1.20 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.19 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.18 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.17 19-Jan-2021  thorpej of_compatible() is a hokey API (returning -1 for no match) and nothing
here relies on its reverse-index return value semantics, so just use
of_match_compat_data() instead.
 1.16 09-Dec-2016  christos branches: 1.16.30;
Factor our model printing code; use aprint; eliminate alloca.
 1.15 23-Nov-2011  jmcneill branches: 1.15.8; 1.15.26; 1.15.30;
Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.
 1.14 28-Apr-2008  martin branches: 1.14.12; 1.14.34; 1.14.36;
Remove clause 3 and 4 from TNF licenses
 1.13 26-Mar-2008  xtraeme branches: 1.13.2; 1.13.4;
Split device_t/softc for joy(4) and all its attachments. Also
use device_lookup_private() and related cosmetic changes.

Reviewed by cube@.
 1.12 19-Oct-2007  ad branches: 1.12.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.11 14-May-2006  elad branches: 1.11.18; 1.11.32; 1.11.34; 1.11.38;
integrate kauth.
 1.10 29-Mar-2006  thorpej Use device_private().
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 04-Feb-2005  perry branches: 1.8.6;
de-__P
 1.7 02-Oct-2002  thorpej branches: 1.7.6; 1.7.14; 1.7.16;
Add trailing ; to CFATTACH_DECL.
 1.6 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 08-Jun-2002  yamt constify and make auto const variables static.
 1.3 03-Feb-2002  pooka branches: 1.3.8;
make this compile:
include dev/ic/joyvar.h instead of the now non-existant arm32/isa/joyvar.h
 1.2 13-Nov-2001  lukem add RCSIDs
 1.1 20-Aug-1998  thorpej branches: 1.1.24; 1.1.26;
Add ofisa attachment for the ISA joystick driver.
XXX currently arm32-specific.
 1.1.26.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.26.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.26.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.26.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.24.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.24.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.24.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.24.1 14-Nov-2001  nathanw Catch up to -current.
 1.3.8.1 20-Jun-2002  gehenna catch up with -current.
 1.7.16.1 12-Feb-2005  yamt sync with head.
 1.7.14.1 29-Apr-2005  kent sync with -current
 1.7.6.1 04-Feb-2005  skrll Sync with HEAD.
 1.8.6.2 27-Oct-2007  yamt sync with head.
 1.8.6.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 19-Apr-2006  elad sync with head.
 1.9.8.1 01-Apr-2006  yamt sync with head.
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.11.38.1 25-Oct-2007  bouyer Sync with HEAD.
 1.11.34.1 06-Nov-2007  matt sync with HEAD
 1.11.32.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.11.18.1 23-Oct-2007  ad Sync with head.
 1.12.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.12.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.13.4.1 16-May-2008  yamt sync with head.
 1.13.2.1 18-May-2008  yamt sync with head.
 1.14.36.2 20-Nov-2011  mrg make this compile again. i think it is even right.
 1.14.36.1 19-Nov-2011  jmcneill port ad-audiomp2 branch changes to 5.99.56
todo:
- port ad-audiomp2 pcppi changes
- these drivers need to be fixed:
- emuxki
- gcscaudio
- hdafg
- uaudio
- umidi
- MD audio drivers
 1.14.34.1 17-Apr-2012  yamt sync with head
 1.14.12.1 12-Dec-2008  ad Checkpoint work in progress.
 1.15.30.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.15.26.1 05-Feb-2017  skrll Sync with HEAD
 1.15.8.1 03-Dec-2017  jdolecek update from HEAD
 1.16.30.1 03-Apr-2021  thorpej Sync with HEAD.
 1.19 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.18 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.17 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.16 19-Jan-2021  thorpej of_compatible() is a hokey API (returning -1 for no match) and nothing
here relies on its reverse-index return value semantics, so just use
of_match_compat_data() instead.
 1.15 27-Oct-2012  chs branches: 1.15.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.14 08-Apr-2008  cegger branches: 1.14.38; 1.14.48;
use aprint_*_dev and device_xname
 1.13 07-Mar-2008  cube Split the softc from the device_t for all lpt(4) variants and attachments
except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.

As usual, it comes with related cosmetic changes.
 1.12 19-Oct-2007  ad branches: 1.12.12; 1.12.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.11 29-Mar-2006  thorpej branches: 1.11.18; 1.11.32; 1.11.34; 1.11.38;
Use device_private().
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.6; 1.10.8; 1.10.10; 1.10.12;
merge ktrace-lwp.
 1.9 27-Feb-2005  perry branches: 1.9.4;
nuke trailing whitespace
 1.8 04-Feb-2005  perry de-__P
 1.7 02-Oct-2002  thorpej branches: 1.7.6; 1.7.14; 1.7.16;
Add trailing ; to CFATTACH_DECL.
 1.6 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 08-Jun-2002  yamt constify and make auto const variables static.
 1.3 13-Nov-2001  lukem branches: 1.3.8;
add RCSIDs
 1.2 21-Mar-1998  cgd branches: 1.2.26; 1.2.28;
compile with -Wall, update for changes to dev/ofw
 1.1 07-Feb-1998  cgd initial implementation of OFW ISA bus code and attachments for a few
devices. Still a bit rough, but works well enough. Requires a bunch of
machine-dependent glue (since this is, in effect, a MI bus bridge).
 1.2.28.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.28.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.28.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.26.3 18-Oct-2002  nathanw Catch up to -current.
 1.2.26.2 20-Jun-2002  nathanw Catch up to -current.
 1.2.26.1 14-Nov-2001  nathanw Catch up to -current.
 1.3.8.1 20-Jun-2002  gehenna catch up with -current.
 1.7.16.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.16.1 12-Feb-2005  yamt sync with head.
 1.7.14.1 29-Apr-2005  kent sync with -current
 1.7.6.2 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.7.6.1 04-Feb-2005  skrll Sync with HEAD.
 1.9.4.3 17-Mar-2008  yamt sync with head.
 1.9.4.2 27-Oct-2007  yamt sync with head.
 1.9.4.1 21-Jun-2006  yamt sync with head.
 1.10.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.10.10.1 19-Apr-2006  elad sync with head.
 1.10.8.1 01-Apr-2006  yamt sync with head.
 1.10.6.1 22-Apr-2006  simonb Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.38.1 25-Oct-2007  bouyer Sync with HEAD.
 1.11.34.2 23-Mar-2008  matt sync with HEAD
 1.11.34.1 06-Nov-2007  matt sync with HEAD
 1.11.32.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.11.18.1 23-Oct-2007  ad Sync with head.
 1.12.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.12.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.12.12.1 24-Mar-2008  keiichi sync with head.
 1.14.48.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.38.1 30-Oct-2012  yamt sync with head
 1.15.52.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 27-Apr-2021  thorpej branches: 1.1.4;
"ofisa" carried an "ofbus" interface attribute in addition to its own
in order to attach an "ofrtc" instance. This worked prior to the
autconfiguration system enforcing non-ambiguous interface attribute
specificaitons due to how the attach args for ofisa were structured.

But it no longer works, and is a big dodgy barring a formalized "subclassing"
facility for interface atributes in config(5).

So, stop using "ofrtc" on Shark, and replace it with an ofisa driver for
the mc146818 real time clock hardware, and remove "ofbus" from "ofisa".
 1.1.4.2 13-May-2021  thorpej Sync with HEAD.
 1.1.4.1 27-Apr-2021  thorpej file mcclock_ofisa.c was added on branch thorpej-i2c-spi-conf on 2021-05-13 00:47:30 +0000
 1.35 22-Jan-2022  thorpej Change the devhandle_from_*() functions to also take a "super handle",
from which the newly created handle will inherit it's implementation.
The root implementation for a new handle type is used if an invalid
"super handle" is passed.
 1.34 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.33 30-Apr-2021  thorpej branches: 1.33.6;
Allow devices to declare themselves an "ofisa_subclass", allowing
that device to beat "ofisa" in match, but then attach an "ofisa"
instance as a logical child at the same OFW node.
 1.32 27-Apr-2021  thorpej "ofisa" carried an "ofbus" interface attribute in addition to its own
in order to attach an "ofrtc" instance. This worked prior to the
autconfiguration system enforcing non-ambiguous interface attribute
specificaitons due to how the attach args for ofisa were structured.

But it no longer works, and is a big dodgy barring a formalized "subclassing"
facility for interface atributes in config(5).

So, stop using "ofrtc" on Shark, and replace it with an ofisa driver for
the mc146818 real time clock hardware, and remove "ofbus" from "ofisa".
 1.31 24-Apr-2021  thorpej branches: 1.31.2;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.30 27-Jan-2021  thorpej branches: 1.30.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.29 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.28 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.27 19-Jan-2021  thorpej of_compatible() is a hokey API (returning -1 for no match) and nothing
here relies on its reverse-index return value semantics, so just use
of_match_compat_data() instead.
 1.26 03-Sep-2018  riastradh branches: 1.26.12;
Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.25 09-Dec-2016  christos branches: 1.25.14; 1.25.16;
Factor our model printing code; use aprint; eliminate alloca.
 1.24 03-Jun-2011  matt branches: 1.24.12; 1.24.30; 1.24.34;
-CFATTACH_DECL(foo, sizeof(struct device),
+CFATTACH_DECL_NEW(foo, 0,
 1.23 12-May-2009  cegger branches: 1.23.4; 1.23.6; 1.23.10;
struct device * -> device_t, no functional changes intended.
 1.22 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.21 18-Mar-2009  cegger bzero -> memset
 1.20 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.19 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.18 19-Oct-2007  ad branches: 1.18.20; 1.18.28; 1.18.34;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.17 20-Feb-2007  matt branches: 1.17.4; 1.17.16; 1.17.18; 1.17.22;
Fix tpyo.
 1.16 11-Dec-2005  christos branches: 1.16.26;
merge ktrace-lwp.
 1.15 04-Feb-2005  perry branches: 1.15.6;
de-__P
 1.14 22-Apr-2004  itojun branches: 1.14.4; 1.14.6;
sprintf -> snprintf
 1.13 01-Jan-2003  thorpej branches: 1.13.2;
Use aprint_normal() in cfprint routines.
 1.12 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.11 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.10 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.9 08-Jun-2002  yamt constify and make auto const variables static.
 1.8 13-Nov-2001  lukem branches: 1.8.8;
add RCSIDs
 1.7 19-Jun-2001  wiz branches: 1.7.2;
`existent', not `existant'
 1.6 30-Jun-1998  thorpej branches: 1.6.26;
- Fix a bug that prevented one from requesting a subset of a property
containing multiple values.
- Add a way to get the "dma" property for a node.
 1.5 11-Jun-1998  thorpej Per leo@netbsd.org: Don't call isa_dmainit() if NISADMA == 0.
 1.4 10-Jun-1998  tv Change `dev' -> `self' in ofisaattach(), compile error
 1.3 09-Jun-1998  thorpej Initialize DMA state when we attach the ofisa bus.
 1.2 21-Mar-1998  cgd compile with -Wall, update for changes to dev/ofw
 1.1 07-Feb-1998  cgd initial implementation of OFW ISA bus code and attachments for a few
devices. Still a bit rough, but works well enough. Requires a bunch of
machine-dependent glue (since this is, in effect, a MI bus bridge).
 1.6.26.5 03-Jan-2003  thorpej Sync with HEAD.
 1.6.26.4 18-Oct-2002  nathanw Catch up to -current.
 1.6.26.3 20-Jun-2002  nathanw Catch up to -current.
 1.6.26.2 14-Nov-2001  nathanw Catch up to -current.
 1.6.26.1 21-Jun-2001  nathanw Catch up to -current.
 1.7.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.7.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.8.1 20-Jun-2002  gehenna catch up with -current.
 1.13.2.4 04-Feb-2005  skrll Sync with HEAD.
 1.13.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.6.1 12-Feb-2005  yamt sync with head.
 1.14.4.1 29-Apr-2005  kent sync with -current
 1.15.6.2 27-Oct-2007  yamt sync with head.
 1.15.6.1 26-Feb-2007  yamt sync with head.
 1.16.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.17.22.1 25-Oct-2007  bouyer Sync with HEAD.
 1.17.18.1 06-Nov-2007  matt sync with HEAD
 1.17.16.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.17.4.1 23-Oct-2007  ad Sync with head.
 1.18.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.18.20.2 16-May-2009  yamt sync with head
 1.18.20.1 04-May-2009  yamt sync with head.
 1.23.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.23.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.23.4.1 12-Jun-2011  rmind sync with head
 1.24.34.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.24.30.1 05-Feb-2017  skrll Sync with HEAD
 1.24.12.1 03-Dec-2017  jdolecek update from HEAD
 1.25.16.1 10-Jun-2019  christos Sync with HEAD
 1.25.14.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.26.12.1 03-Apr-2021  thorpej Sync with HEAD.
 1.30.2.2 04-Apr-2021  thorpej Associate the OpenFirmware phandle associated with a found device (including
PCI bus instances) by using CFARG_DEVHANDLE.
 1.30.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.31.2.1 13-May-2021  thorpej Sync with HEAD.
 1.33.6.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.8 30-Apr-2021  thorpej Allow devices to declare themselves an "ofisa_subclass", allowing
that device to beat "ofisa" in match, but then attach an "ofisa"
instance as a logical child at the same OFW node.
 1.7 09-Dec-2016  christos branches: 1.7.34;
Factor our model printing code; use aprint; eliminate alloca.
 1.6 11-Dec-2005  christos branches: 1.6.120; 1.6.140; 1.6.144;
merge ktrace-lwp.
 1.5 04-Feb-2005  perry de-__P
 1.4 19-Mar-1999  cgd branches: 1.4.42; 1.4.50; 1.4.52;
pull ofisa_machdep.h in from machine/
 1.3 30-Jun-1998  thorpej - Fix a bug that prevented one from requesting a subset of a property
containing multiple values.
- Add a way to get the "dma" property for a node.
 1.2 21-Mar-1998  cgd compile with -Wall, update for changes to dev/ofw
 1.1 07-Feb-1998  cgd initial implementation of OFW ISA bus code and attachments for a few
devices. Still a bit rough, but works well enough. Requires a bunch of
machine-dependent glue (since this is, in effect, a MI bus bridge).
 1.4.52.1 12-Feb-2005  yamt sync with head.
 1.4.50.1 29-Apr-2005  kent sync with -current
 1.4.42.1 04-Feb-2005  skrll Sync with HEAD.
 1.6.144.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.6.140.1 05-Feb-2017  skrll Sync with HEAD
 1.6.120.1 03-Dec-2017  jdolecek update from HEAD
 1.7.34.1 13-May-2021  thorpej Sync with HEAD.
 1.20 25-Sep-2022  thorpej malloc(9) -> kmem(9)
 1.19 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.18 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.17 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.16 19-Jan-2021  thorpej Use device_compatible_entry / of_search_compatible() for the child
nodes rather than using of_compatible() to match against different
sets of compatible strings.
 1.15 15-Mar-2008  cube branches: 1.15.106;
Split device_t and softc for pckbc(4) and its attachments.
 1.14 04-Jan-2008  ad branches: 1.14.2; 1.14.6;
Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
 1.13 19-Oct-2007  ad branches: 1.13.2; 1.13.8;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.12 09-Jul-2007  ad branches: 1.12.6; 1.12.8; 1.12.12;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.11 29-Mar-2006  thorpej branches: 1.11.18; 1.11.20;
Use device_private().
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.6; 1.10.8; 1.10.10; 1.10.12;
merge ktrace-lwp.
 1.9 27-Feb-2005  perry branches: 1.9.4;
nuke trailing whitespace
 1.8 24-Mar-2004  drochner branches: 1.8.8; 1.8.10;
remove license clauses 3 and 4 from my cpoyright notices
 1.7 02-Oct-2002  thorpej branches: 1.7.6;
Add trailing ; to CFATTACH_DECL.
 1.6 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 08-Jun-2002  yamt constify and make auto const variables static.
 1.3 14-Jan-2002  tsutsui branches: 1.3.8;
Call malloc(9) with M_ZERO flag instead of bzero() after malloc().
 1.2 13-Nov-2001  lukem add RCSIDs
 1.1 26-Feb-2001  matt branches: 1.1.2; 1.1.4; 1.1.6;
Add pckbc attachment so we can get wscons on the dnard.
 1.1.6.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 26-Feb-2001  bouyer file pckbc_ofisa.c was added on branch thorpej_scsipi on 2001-03-12 13:30:58 +0000
 1.1.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 14-Nov-2001  nathanw Catch up to -current.
 1.3.8.1 20-Jun-2002  gehenna catch up with -current.
 1.7.6.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.7.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.6.1 03-Aug-2004  skrll Sync with HEAD
 1.8.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.8.8.1 29-Apr-2005  kent sync with -current
 1.9.4.5 17-Mar-2008  yamt sync with head.
 1.9.4.4 21-Jan-2008  yamt sync with head
 1.9.4.3 27-Oct-2007  yamt sync with head.
 1.9.4.2 03-Sep-2007  yamt sync with head.
 1.9.4.1 21-Jun-2006  yamt sync with head.
 1.10.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.10.10.1 19-Apr-2006  elad sync with head.
 1.10.8.1 01-Apr-2006  yamt sync with head.
 1.10.6.1 22-Apr-2006  simonb Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.20.1 11-Jul-2007  mjf Sync with head.
 1.11.18.2 23-Oct-2007  ad Sync with head.
 1.11.18.1 01-Jul-2007  ad Adapt to callout API change.
 1.12.12.1 25-Oct-2007  bouyer Sync with HEAD.
 1.12.8.3 23-Mar-2008  matt sync with HEAD
 1.12.8.2 09-Jan-2008  matt sync with HEAD
 1.12.8.1 06-Nov-2007  matt sync with HEAD
 1.12.6.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.13.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.13.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.14.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.14.2.1 24-Mar-2008  keiichi sync with head.
 1.15.106.1 03-Apr-2021  thorpej Sync with HEAD.
 1.24 18-Apr-2023  riastradh sb(4): Fix missing mutex initialization at isapnp and ofisa.

PR kern/57363

XXX pullup-8
XXX pullup-9
XXX pullup-10
 1.23 27-Jan-2021  thorpej branches: 1.23.18;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.22 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.21 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.20 19-Jan-2021  thorpej of_compatible() is a hokey API (returning -1 for no match) and nothing
here relies on its reverse-index return value semantics, so just use
of_match_compat_data() instead.
 1.19 08-May-2019  isaki branches: 1.19.2; 1.19.10;
Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.18 09-Dec-2016  christos branches: 1.18.8; 1.18.16; 1.18.20;
Factor our model printing code; use aprint; eliminate alloca.
 1.17 28-Apr-2008  martin branches: 1.17.44; 1.17.64; 1.17.68;
Remove clause 3 and 4 from TNF licenses
 1.16 15-Mar-2008  cube branches: 1.16.2; 1.16.4;
Split device_t and softc for sb(4) and all its attachments.
 1.15 19-Oct-2007  ad branches: 1.15.12; 1.15.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.14 29-Mar-2006  thorpej branches: 1.14.16; 1.14.18; 1.14.32; 1.14.34; 1.14.38;
Use device_private().
 1.13 11-Dec-2005  christos branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
merge ktrace-lwp.
 1.12 04-Feb-2005  perry branches: 1.12.6;
de-__P
 1.11 03-May-2003  wiz branches: 1.11.2; 1.11.10; 1.11.12;
DMA, not dma nor Dma.
 1.10 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.9 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 08-Jun-2002  yamt constify and make auto const variables static.
 1.6 13-Nov-2001  lukem branches: 1.6.8;
add RCSIDs
 1.5 30-Mar-1999  thorpej branches: 1.5.20; 1.5.22;
Fix a typo.
 1.4 19-Feb-1999  mycroft Move IRQ setup into frontend. Need to move DRQ handling as well.
 1.3 18-Aug-1998  thorpej This now needs <dev/midi_if.h> to build.
 1.2 14-Jul-1998  thorpej Print the "model" property.
 1.1 01-Jul-1998  thorpej OpenFirmware glue for ISA SoundBlaster and compatible devices.
 1.5.22.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.5.22.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.22.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.20.3 18-Oct-2002  nathanw Catch up to -current.
 1.5.20.2 20-Jun-2002  nathanw Catch up to -current.
 1.5.20.1 14-Nov-2001  nathanw Catch up to -current.
 1.6.8.1 20-Jun-2002  gehenna catch up with -current.
 1.11.12.1 12-Feb-2005  yamt sync with head.
 1.11.10.1 29-Apr-2005  kent sync with -current
 1.11.2.1 04-Feb-2005  skrll Sync with HEAD.
 1.12.6.3 17-Mar-2008  yamt sync with head.
 1.12.6.2 27-Oct-2007  yamt sync with head.
 1.12.6.1 21-Jun-2006  yamt sync with head.
 1.13.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.13.10.1 19-Apr-2006  elad sync with head.
 1.13.8.1 01-Apr-2006  yamt sync with head.
 1.13.6.1 22-Apr-2006  simonb Sync with head.
 1.13.4.1 09-Sep-2006  rpaulo sync with head
 1.14.38.1 25-Oct-2007  bouyer Sync with HEAD.
 1.14.34.2 23-Mar-2008  matt sync with HEAD
 1.14.34.1 06-Nov-2007  matt sync with HEAD
 1.14.32.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.14.18.1 23-Oct-2007  ad Sync with head.
 1.14.16.1 27-Feb-2007  ad Add MP locking for audio drivers.
 1.15.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.15.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.15.12.1 24-Mar-2008  keiichi sync with head.
 1.16.4.1 16-May-2008  yamt sync with head.
 1.16.2.1 18-May-2008  yamt sync with head.
 1.17.68.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.17.64.1 05-Feb-2017  skrll Sync with HEAD
 1.17.44.1 03-Dec-2017  jdolecek update from HEAD
 1.18.20.2 04-May-2019  isaki Move dev/audio_if.h -> dev/audio/audio_if.h
 1.18.20.1 03-May-2019  isaki Remove dev/auconv.[ch].
Now it is handled in dev/audio/audio.c and dev/audio/linear.c.
Remove dev/mulaw.h.
It already have been just a link to dev/audio/mulaw.h in this
branch.
 1.18.16.1 10-Jun-2019  christos Sync with HEAD
 1.18.8.1 01-Aug-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1870):

sys/dev/isapnp/sb_isapnp.c: revision 1.54
sys/dev/ofisa/sb_ofisa.c: revision 1.24

sb(4): Fix missing mutex initialization at isapnp and ofisa.
PR kern/57363
 1.19.10.1 03-Apr-2021  thorpej Sync with HEAD.
 1.19.2.1 01-Aug-2023  martin Pull up following revision(s) (requested by riastradh in ticket #1689):

sys/dev/isapnp/sb_isapnp.c: revision 1.54
sys/dev/ofisa/sb_ofisa.c: revision 1.24

sb(4): Fix missing mutex initialization at isapnp and ofisa.
PR kern/57363
 1.23.18.1 01-Aug-2023  martin Pull up following revision(s) (requested by riastradh in ticket #286):

sys/dev/isapnp/sb_isapnp.c: revision 1.54
sys/dev/ofisa/sb_ofisa.c: revision 1.24

sb(4): Fix missing mutex initialization at isapnp and ofisa.
PR kern/57363
 1.41 25-Sep-2022  thorpej Remove unnecessary include of <sys/malloc.h>.
 1.40 27-Jan-2021  thorpej Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.39 27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.38 25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.37 19-Jan-2021  thorpej of_compatible() is a hokey API (returning -1 for no match) and nothing
here relies on its reverse-index return value semantics, so just use
of_match_compat_data() instead.
 1.36 20-Oct-2017  jdolecek branches: 1.36.18;
move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

on topic of PR kern/52606
 1.35 10-Oct-2017  jdolecek fix wdc_init_shadow_regs() arg
 1.34 07-Oct-2017  jdolecek adapt several more wdc attachments for NCQ branch merge
 1.33 31-Jul-2012  bouyer branches: 1.33.2;
Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
 1.32 26-Jul-2012  jakllsch Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
 1.31 02-Jul-2012  bouyer Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
when SATA cable move was needed
 1.30 18-Mar-2008  cube branches: 1.30.38;
Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
 1.29 19-Oct-2007  ad branches: 1.29.12; 1.29.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.28 29-Mar-2006  thorpej branches: 1.28.18; 1.28.32; 1.28.34; 1.28.38;
Use device_private().
 1.27 16-Jan-2006  bouyer branches: 1.27.2; 1.27.4; 1.27.6; 1.27.8; 1.27.10;
properly use ata_channel->ch_ndrive:
- initialize it properly in the bus front-ends (all 2, exept in wdc_pcmcia.c
for the "Sandisk CompactFlash Card" where it's set to 1)
- remplace hardcoded '2' by ata_channel->ch_ndrive in MI IDE drivers.

From Christos Zoulas in kern/32501.
 1.26 11-Dec-2005  christos branches: 1.26.2;
merge ktrace-lwp.
 1.25 27-Feb-2005  perry branches: 1.25.4;
nuke trailing whitespace
 1.24 25-Aug-2004  reinoud branches: 1.24.4; 1.24.6;
Delay initialisation of shadow registers. Tested on a Shark.
 1.23 20-Aug-2004  thorpej Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
 1.22 19-Aug-2004  thorpej Use ANSI function decls and "static".
 1.21 14-Aug-2004  thorpej - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
ata_channel. Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
maximum number of drives that can be present on the channel. For now,
this is always 2. Add an ATA_MAXDRIVES constant that places an upper
limit on this value, also currently 2.
 1.20 25-May-2004  thorpej Add the notion of "shadow registers" to the wdc driver. These shadow
registers are registers that overlap with others on many controllers, but
which may actually be distinct on some controllers. Right now, the two
shadows are:

- wd_status (usually overlaps wd_command)
- wd_features (usually overlaps wd_error)

Add a new helper function, wdc_init_shadow_regs(), used to initialize
the shadow register handles on controllers where they do actually overlap.

Partially from Jordan Rhody @ Wasabi Systems, Inc.
 1.19 03-Jan-2004  thorpej More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
 1.18 03-Jan-2004  thorpej Rename "struct channel_softc" to "struct wdc_channel".
 1.17 01-Jan-2004  thorpej Rename:
- wdc_xfer to ata_xfer
- channel_queue to ata_queue
and move them to <dev/ata/atavar.h> so they can be used by non-wdc ATA
controllers. Clean up the member names of these structures while at it.
 1.16 27-Nov-2003  fvdl There are some cards that map the ATA control and IDE DMA registers
in a different fashion. Individually, they have the same functionality,
but their layout is different. An example of such a chipset is
the Promise 203xx.

To be able to deal with this, transform the cmd and dma bus_space handles
into an array of handles, each seperately created with bus_space_subregion.
The code generated by using the extra indirection shouldn't change much,
since the extra indirection is negated by having the offset calculation
already done in bus_space_subregion. E.g.

bus_space_write_4(tag, handle, offset, value)

becomes

bus_space_write_4(tag, handles[offset], 0, value)

Reviewed by Manuel Bouyer. Tested on wdc_isa, wdc_pcmcia, viaide, piixide (i386)
and on cmdide (sparc64).
 1.15 08-Oct-2003  bouyer Make the ATA mid-layer appears as atabus, as proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/25/0006.html
This adds a device (atabus) between IDE controllers and wd or atapibus, to
have each ATA channel show up in the device tree. Later there will be atabus
devices in /dev, so that we can do IOCTL on them.
Each atabus has its own kernel thread, to handle operations that needs polling,
e.g. reset and others.

Device probing on each bus it defered to the atabus thread creation.
This allows to do the reset and basic device probes in parallel, which reduce
boot time on systems with several pciide controllers.
 1.14 25-Sep-2003  mycroft Hide the use of config_interrupts() in one place.
 1.13 19-Sep-2003  mycroft 1) Use config_interrupts() to attach IDE and ATAPI drives. This eliminates
most polling.
2) Clean up some goofiness in pciide -- get rid of the whole "candisable" path
(it's gratuitous) and simplify the code by calling pciide_map_compat_intr(),
*_set_modes() and wdc_print_modes() from central locations.
3) Add a register writability and register ghost test to eliminate phantom
drives more quickly.
 1.12 22-Mar-2003  matt branches: 1.12.2;
Don't malloc channel_queue, put it in the softc.
 1.11 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.10 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 08-Jun-2002  yamt constify and make auto const variables static.
 1.7 13-Nov-2001  lukem branches: 1.7.8;
add RCSIDs
 1.6 04-Mar-2001  matt branches: 1.6.2; 1.6.4;
print the modes of the IDE devices we've attached.
 1.5 02-Dec-1998  sommerfe branches: 1.5.10;
Change ofisa attachment comparable to change drochner made to isa
attachment. Works at least well enough to allow kernel to build &
boot on diskless shark with wdc controller in it.
 1.4 23-Oct-1998  bouyer Pass the rigth argument to wdcintr(). Closes PR 6342.
 1.3 12-Oct-1998  bouyer Merge bouyer-ide
 1.2 21-Mar-1998  cgd branches: 1.2.2;
compile with -Wall, update for changes to dev/ofw
 1.1 07-Feb-1998  cgd initial implementation of OFW ISA bus code and attachments for a few
devices. Still a bit rough, but works well enough. Requires a bunch of
machine-dependent glue (since this is, in effect, a MI bus bridge).
 1.2.2.4 02-Oct-1998  bouyer Cleanup a few error message, remove some dead code. Re-add a reset at end of
attach, unless we have WDC_NO_EXTRA_RESETS.
Add support for data32iot/data32ioh from -current: each controller pass
WDC_CAPABILITY_DATA32 if they can do 32bit, and WDC_CAPABILITY_DATA16 if they
can do 16bit. For controller that support both, the usual autodetect
mechanism is still used.
 1.2.2.3 02-Oct-1998  matt Get this to compile and probe the devices on the Shark. (it hangs when
going multi-user).
 1.2.2.2 13-Aug-1998  bouyer - sync with -current
- b* -> mem*
 1.2.2.1 04-Jun-1998  bouyer Commit changes to the IDE system in a branch. This allows a better separation
between higth-level and low-level (i.e. registers read/write) and generalize
the queue for all commands. This also add supports for IDE DMA.
 1.5.10.1 12-Mar-2001  bouyer Sync with HEAD.
 1.6.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.6.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.6.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.6.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.6.2.1 14-Nov-2001  nathanw Catch up to -current.
 1.7.8.1 20-Jun-2002  gehenna catch up with -current.
 1.12.2.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.12.2.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.4 18-Sep-2004  skrll Sync with HEAD.
 1.12.2.3 03-Sep-2004  skrll Sync with HEAD
 1.12.2.2 25-Aug-2004  skrll Sync with HEAD.
 1.12.2.1 03-Aug-2004  skrll Sync with HEAD
 1.24.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.24.4.1 29-Apr-2005  kent sync with -current
 1.25.4.3 24-Mar-2008  yamt sync with head.
 1.25.4.2 27-Oct-2007  yamt sync with head.
 1.25.4.1 21-Jun-2006  yamt sync with head.
 1.26.2.1 01-Feb-2006  yamt sync with head.
 1.27.10.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.27.8.1 19-Apr-2006  elad sync with head.
 1.27.6.1 01-Apr-2006  yamt sync with head.
 1.27.4.1 22-Apr-2006  simonb Sync with head.
 1.27.2.1 09-Sep-2006  rpaulo sync with head
 1.28.38.1 25-Oct-2007  bouyer Sync with HEAD.
 1.28.34.2 23-Mar-2008  matt sync with HEAD
 1.28.34.1 06-Nov-2007  matt sync with HEAD
 1.28.32.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.28.18.1 23-Oct-2007  ad Sync with head.
 1.29.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.29.12.1 24-Mar-2008  keiichi sync with head.
 1.30.38.1 30-Oct-2012  yamt sync with head
 1.33.2.1 03-Dec-2017  jdolecek update from HEAD
 1.36.18.1 03-Apr-2021  thorpej Sync with HEAD.

RSS XML Feed