Home | History | Annotate | only in /src/sys/arch/hpcsh/dev
History log of /src/sys/arch/hpcsh/dev
RevisionDateAuthorComments
 1.14 05-Apr-2009  uwe Register null hooks with pmf(9) for now, which is no worse than before
and allows us to test other things. Power management is still done
via CONFIG_HOOK_POWERCONTROL_LCD.
 1.13 28-Mar-2008  uwe branches: 1.13.4; 1.13.12; 1.13.18;
Use aprint_*.
 1.12 27-Mar-2008  uwe Split device_t and softc.
 1.11 27-Oct-2006  uwe branches: 1.11.52;
Nuke GPROF cargo-cult I've been cut-n-pasting around in my drivers.
 1.10 18-Dec-2005  uwe branches: 1.10.20; 1.10.22;
Simplify j6x0lcd_contrast_raw.
 1.9 18-Dec-2005  uwe Convert few remaining K&R function definitions to ANSI.
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 03-Aug-2005  uwe Support HP 620LX. On/off and brightness are the same as in 680.
Contrast control is different but similar enough, so refactor the code
to support both. Tested by Christer Andersson.

XXX: platid_mask_MACH_HP_LX also matches 360LX. It's not confirmed
whether touch panel in 360LX is connected in the same way. We may
need to regroup platid masks.
 1.6 28-Feb-2005  uwe branches: 1.6.2; 1.6.4;
Remove another unused #include.
 1.5 28-Feb-2005  uwe Remove unused #include.
 1.4 28-Feb-2005  uwe Whitespace police.
 1.3 04-Apr-2004  uwe branches: 1.3.2; 1.3.6; 1.3.8;
Correct the comment about contrast control in HD64461 GPIO port B:
6th bit is the least significant, 3rd is the most significant.
 1.2 15-Mar-2004  uwe Use CONFIG_HOOK_POWERCONTROL_LCD to control turning the LCD on/off
(the _LCDLIGHT hook is apparently meant to control the LCD backlight).
 1.1 15-Mar-2004  uwe Driver that controls power, brightness and contrast of the Jornada 680 LCD.
 1.3.8.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.3.6.1 29-Apr-2005  kent sync with -current
 1.3.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.3.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.2 03-Aug-2004  skrll Sync with HEAD
 1.3.2.1 04-Apr-2004  skrll file j6x0lcd.c was added on branch ktrace-lwp on 2004-08-03 10:35:28 +0000
 1.6.4.2 30-Dec-2006  yamt sync with head.
 1.6.4.1 21-Jun-2006  yamt sync with head.
 1.6.2.1 14-Aug-2005  riz Pull up revision 1.7 (requested by uwe in ticket #651):
Support HP 620LX. On/off and brightness are the same as in 680.
Contrast control is different but similar enough, so refactor the code
to support both. Tested by Christer Andersson.
XXX: platid_mask_MACH_HP_LX also matches 360LX. It's not confirmed
whether touch panel in 360LX is connected in the same way. We may
need to regroup platid masks.
 1.10.22.1 10-Dec-2006  yamt sync with head.
 1.10.20.1 18-Nov-2006  ad Sync with head.
 1.11.52.1 03-Apr-2008  mjf Sync with HEAD.
 1.13.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.13.4.1 04-May-2009  yamt sync with head.
 1.16 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.15 05-Apr-2009  uwe Register with pmf(9), tell it we don't need anything.
 1.14 27-Mar-2008  uwe branches: 1.14.4; 1.14.12; 1.14.18;
Split device_t and softc.
 1.13 27-Oct-2006  uwe branches: 1.13.52;
Nuke GPROF cargo-cult I've been cut-n-pasting around in my drivers.
 1.12 05-Mar-2006  uwe branches: 1.12.2; 1.12.14; 1.12.16;
ANSI: Use 'void' in the definition of function w/out arguments.
While here, add 2006 to the copyright.
 1.11 04-Mar-2006  peter Fix two typos.
 1.10 26-Feb-2006  uwe Report power status to apm. Reported are AC on/off, batter absent,
battery is being charged, and estimated battery percentage (thanks to
Joseph Heenan for battery discharge measurements).
 1.9 25-Feb-2006  uwe Cosmetic. Consistenly use return without parens as new KNF requires.
Move assignment out of conditional expression.
 1.8 24-Dec-2005  perry branches: 1.8.2; 1.8.4; 1.8.6;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 24-Apr-2005  uwe branches: 1.6.2;
Correct the comment about lid state bit.
 1.5 04-Jul-2004  uwe branches: 1.5.2; 1.5.6;
Express LED operations using standard macros.
Same object code is generated.
 1.4 03-Jul-2004  uch jornada 6x0 power mannagement support.
[on/off] button power off LCD and CPU sleeps.
 1.3 22-Oct-2003  uwe Use adcvar.h.
 1.2 19-Oct-2003  uwe __KERNEL_RCSID.
 1.1 18-Oct-2003  uwe Jornada 680/690 power &c. Doesn't do much useful at the moment, but
provides RTFS documentation on how things are wired in Jornada.

Listens to "switch off" interrupt generated when On/Off button is
pressed, or the lid is closed.

Polls the status of main and backup batteries and warns if main
battery is low.
 1.5.6.1 29-Apr-2005  kent sync with -current
 1.5.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.2 03-Aug-2004  skrll Sync with HEAD
 1.5.2.1 04-Jul-2004  skrll file j6x0pwr.c was added on branch ktrace-lwp on 2004-08-03 10:35:28 +0000
 1.6.2.2 30-Dec-2006  yamt sync with head.
 1.6.2.1 21-Jun-2006  yamt sync with head.
 1.8.6.1 22-Apr-2006  simonb Sync with head.
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.8.2.1 01-Mar-2006  yamt sync with head.
 1.12.16.1 10-Dec-2006  yamt sync with head.
 1.12.14.1 18-Nov-2006  ad Sync with head.
 1.12.2.2 05-Mar-2006  uwe ANSI: Use 'void' in the definition of function w/out arguments.
While here, add 2006 to the copyright.
 1.12.2.1 05-Mar-2006  uwe file j6x0pwr.c was added on branch yamt-pdpolicy on 2006-03-05 02:17:48 +0000
 1.13.52.1 03-Apr-2008  mjf Sync with HEAD.
 1.14.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.14.4.1 04-May-2009  yamt sync with head.
 1.26 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.25 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.24 24-Apr-2021  thorpej branches: 1.24.8;
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.23 05-Apr-2009  uwe branches: 1.23.78;
Register with pmf(9), tell it we don't need anything.
 1.22 27-Mar-2008  uwe branches: 1.22.4; 1.22.12; 1.22.18;
Split device_t and softc.
 1.21 17-Oct-2007  garbled branches: 1.21.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.20 11-Jul-2007  uwe branches: 1.20.10;
Grr, revert unrelated changes that are traces of an unfinished experiment.
 1.19 11-Jul-2007  uwe Catch up with callout_init signature change.
 1.18 01-Jun-2007  uwe Rename j6x0tp_set_enable to j6x0tp_enable_child which better reflects
what this function does and is way less confusing too.
 1.17 01-Jun-2007  uwe Cosmetic. Use device_xname. Don't compile debugging support. Drop
out-of-date comment for j6x0tp_attach (we haven't been using submatch
for quite a while).
 1.16 04-Mar-2007  christos branches: 1.16.2; 1.16.4; 1.16.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.15 12-Nov-2006  plunky branches: 1.15.4;
Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.14 27-Oct-2006  uwe Nuke GPROF cargo-cult I've been cut-n-pasting around in my drivers.
 1.13 22-Oct-2006  uwe Revert previous that apparently has been committed by mistake.
It actually contained just some debugging printfs, and *wrong*
debugging printfs at that (hi, jared :)
 1.12 24-Sep-2006  jmcneill Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
 1.11 23-May-2006  uwe branches: 1.11.6; 1.11.8;
Add more "static" so that only j6x0tp_ca (and j6x0tp_debug) are visible.
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.6; 1.10.8; 1.10.12; 1.10.14;
merge ktrace-lwp.
 1.9 23-Sep-2005  uwe Whitespace nit.
 1.8 16-Jul-2005  uwe Match HP 620LX. Tested by Christer Andersson.

XXX: platid_mask_MACH_HP_LX also matches 360LX. It's not confirmed
whether touch panel in 360LX is connected in the same way. We may
need to regroup platid masks.
 1.7 28-Jun-2005  drochner branches: 1.7.2;
convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.6 31-May-2005  uwe Use __UNCONST to pass default calibration data to tpcalib_ioctl().
 1.5 28-May-2004  tsarna branches: 1.5.2; 1.5.12;
Refactor tpcalib and hpc* ports to make tpcalib MI, as discussed on tech-kern.
 1.4 05-Nov-2003  uwe ispell comments.
 1.3 04-Nov-2003  uwe Provide wskbd* at j6x0tp? attachment that maps taps on the "HP hard
icons" (along the right edge of the screen) to key presses.
 1.2 22-Oct-2003  uwe Use adcvar.h.
 1.1 19-Oct-2003  uwe Driver for Jornada 680 touch screen.
 1.5.12.1 14-Aug-2005  riz Pull up revisions 1.6-1.8 (requested by uwe in ticket #652):
1.6:
Use __UNCONST to pass default calibration data to tpcalib_ioctl().

1.7:
convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose

1.8:
Match HP 620LX. Tested by Christer Andersson.

XXX: platid_mask_MACH_HP_LX also matches 360LX. It's not confirmed
whether touch panel in 360LX is connected in the same way. We may
need to regroup platid masks.
 1.5.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.5 24-Jan-2005  skrll Adapt to branch.
 1.5.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.2 03-Aug-2004  skrll Sync with HEAD
 1.5.2.1 28-May-2004  skrll file j6x0tp.c was added on branch ktrace-lwp on 2004-08-03 10:35:28 +0000
 1.7.2.3 03-Sep-2007  yamt sync with head.
 1.7.2.2 30-Dec-2006  yamt sync with head.
 1.7.2.1 21-Jun-2006  yamt sync with head.
 1.10.14.1 19-Jun-2006  chap Sync with head.
 1.10.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.10.8.1 24-May-2006  yamt sync with head.
 1.10.6.1 01-Jun-2006  kardel Sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.8.1 10-Dec-2006  yamt sync with head.
 1.11.6.1 18-Nov-2006  ad Sync with head.
 1.15.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.16.10.2 03-Oct-2007  garbled Sync with HEAD
 1.16.10.1 26-Jun-2007  garbled Sync with HEAD.
 1.16.4.1 11-Jul-2007  mjf Sync with head.
 1.16.2.2 15-Jul-2007  ad Sync with head.
 1.16.2.1 09-Jun-2007  ad Sync with head.
 1.20.10.1 06-Nov-2007  matt sync with HEAD
 1.21.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.22.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.22.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.22.4.1 04-May-2009  yamt sync with head.
 1.23.78.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.24.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 11-Feb-2002  uch branches: 1.1.2; 1.1.8; 1.1.16; 1.1.124; 1.1.126; 1.1.128;
MQ100 (HD64464) register, framebuffer offset define.
 1.1.128.1 16-May-2008  yamt sync with head.
 1.1.126.1 18-May-2008  yamt sync with head.
 1.1.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.16.2 11-Feb-2002  uch MQ100 (HD64464) register, framebuffer offset define.
 1.1.16.1 11-Feb-2002  uch file mq100videoreg.h was added on branch nathanw_sa on 2002-02-11 17:25:01 +0000
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 11-Feb-2002  jdolecek file mq100videoreg.h was added on branch kqueue on 2002-03-16 15:58:04 +0000
 1.1.2.1 28-Feb-2002  nathanw Catch up to -current.
 1.33 01-Jun-2023  andvar fix various typos in comments.
 1.32 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.31 24-Apr-2021  thorpej branches: 1.31.8;
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 07-Aug-2017  uwe branches: 1.30.18;
Don't reschedule the callout in the scanning function itself, as that
conflicts with using the same function for polled console.

Makes early ddb work with wscons console again on my Jornada 690.
 1.29 12-Feb-2012  matt branches: 1.29.6; 1.29.22; 1.29.24; 1.29.40;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.28 19-Jul-2011  dyoung branches: 1.28.2; 1.28.6;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark hpcsh/bus.h obsolete.
 1.27 05-Apr-2009  uwe Register with pmf(9), tell it we don't need anything.
 1.26 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.25 28-Apr-2008  martin branches: 1.25.8; 1.25.14;
Remove clause 3 and 4 from TNF licenses
 1.24 27-Mar-2008  uwe branches: 1.24.2; 1.24.4;
Convert to use CFATTACH_DECL_NEW (no softc).
 1.23 17-Oct-2007  garbled branches: 1.23.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.22 24-Sep-2007  kiyohara Add psh3pwr.
 1.21 09-Jul-2007  ad branches: 1.21.8; 1.21.10; 1.21.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.20 23-Feb-2006  uwe branches: 1.20.24; 1.20.26; 1.20.32;
Order functions so that there's a logic order.
Add comments. Misc cosmetic.
 1.19 23-Feb-2006  uwe s/STATIC/static/
Propagate "static" to function definitions.
 1.18 21-Jan-2006  uwe branches: 1.18.2; 1.18.4;
pfckbd_input: make edge and mask unsigned ints to avoid lint warning
about obscure semantics change in ANSI C. Saves one extu.w too.
Move edge assignment out of if conditional expression.
 1.17 21-Jan-2006  uwe Use C99 __func__ instead of gcc __FUNCTION__ to make lint happy.
 1.16 11-Dec-2005  christos branches: 1.16.2;
merge ktrace-lwp.
 1.15 23-May-2005  kiyohara branches: 1.15.2;
1. Fixed GPIO bits. (PCCR and PCDR)
2. Save and restore PCDR, PDDR, PEDR.
 1.14 18-Jan-2005  uwe Use uint<N>_t instead of u_int<N>_t.
 1.13 18-Jan-2005  uwe Rewrite pfckbd_callout_hitachi() to do the same scan line dance that
pfckbd_callout_hp() does. Change the order of scan and the layout of
the matrix to be more natural.

Chords like <Shift>+<L> now work.

From KIYOHARA Takashi.
 1.12 14-Dec-2003  uwe branches: 1.12.8;
Use callout_schedule instead of callout_reset to re-establish keyboard
callouts.

While here, #if 0 the code in pfckbd_callout_hp to read (and ignore)
PFC registers G and H.
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 24-Dec-2002  uwe branches: 1.10.2;
When scanning HP keyboard, disable output on all scan lines except the
one we are currently scanning. This is what Hitachi's sample WinCE
code does. Thanks to YAEGASHI Takeshi for pointing this out!
This makes same row chords work properly, most importantly
Ctrl-@, Ctrl-W, Ctrl-S, Ctrl-Alt-F1 (ctrl row), Ctrl-Alt-F3 (alt row).
 1.9 02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 28-Feb-2002  uch branches: 1.7.12;
Cleanup register definition
 1.6 17-Feb-2002  uch SH3/SH4 common kernel support.
 1.5 29-Jan-2002  uch clean up debug print and configuration.
 1.4 27-Jan-2002  uch clean up debug print and configuration.
 1.3 14-Sep-2001  uch HITACHI PERSONA keyboard support. patch by KIYOHARA Takashi.
 1.2 02-Mar-2001  uch branches: 1.2.2; 1.2.4; 1.2.6;
fix matrix switch initial value.
 1.1 24-Feb-2001  uch Jornada 690 keyboard driver (matrix switch connected SH3 PFC module)
 1.2.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.2.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.2.6.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.2.4.1 02-Mar-2001  bouyer file pfckbd.c was added on branch thorpej_scsipi on 2001-03-12 13:28:51 +0000
 1.2.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.7.12.3 29-Dec-2002  thorpej Sync with HEAD.
 1.7.12.2 18-Oct-2002  nathanw Catch up to -current.
 1.7.12.1 28-Feb-2002  nathanw file pfckbd.c was added on branch nathanw_sa on 2002-10-18 02:37:22 +0000
 1.10.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.2.4 24-Jan-2005  skrll Sync with HEAD.
 1.10.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.8.1 29-Apr-2005  kent sync with -current
 1.15.2.3 27-Oct-2007  yamt sync with head.
 1.15.2.2 03-Sep-2007  yamt sync with head.
 1.15.2.1 21-Jun-2006  yamt sync with head.
 1.16.2.2 01-Mar-2006  yamt sync with head.
 1.16.2.1 01-Feb-2006  yamt sync with head.
 1.18.4.1 22-Apr-2006  simonb Sync with head.
 1.18.2.1 09-Sep-2006  rpaulo sync with head
 1.20.32.1 03-Oct-2007  garbled Sync with HEAD
 1.20.26.1 11-Jul-2007  mjf Sync with head.
 1.20.24.2 09-Oct-2007  ad Sync with head.
 1.20.24.1 15-Jul-2007  ad Sync with head.
 1.21.12.1 06-Oct-2007  yamt sync with head.
 1.21.10.1 06-Nov-2007  matt sync with HEAD
 1.21.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.23.16.2 02-Jun-2008  mjf Sync with HEAD.
 1.23.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.24.4.2 04-May-2009  yamt sync with head.
 1.24.4.1 16-May-2008  yamt sync with head.
 1.24.2.1 18-May-2008  yamt sync with head.
 1.25.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.25.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.28.6.1 18-Feb-2012  mrg merge to -current.
 1.28.2.1 17-Apr-2012  yamt sync with head
 1.29.40.1 09-Aug-2017  snj Pull up following revision(s) (requested by uwe in ticket #203):
sys/arch/hpcsh/dev/pfckbd.c: revision 1.30
Don't reschedule the callout in the scanning function itself, as that
conflicts with using the same function for polled console.
Makes early ddb work with wscons console again on my Jornada 690.
 1.29.24.1 28-Aug-2017  skrll Sync with HEAD
 1.29.22.1 09-Aug-2017  snj Pull up following revision(s) (requested by uwe in ticket #1466):
sys/arch/hpcsh/dev/pfckbd.c: revision 1.30
Don't reschedule the callout in the scanning function itself, as that
conflicts with using the same function for polled console.
Makes early ddb work with wscons console again on my Jornada 690.
 1.29.6.1 03-Dec-2017  jdolecek update from HEAD
 1.30.18.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.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 24-Feb-2001  uch branches: 1.1.4; 1.1.128; 1.1.130; 1.1.132;
Jornada 690 keyboard driver (matrix switch connected SH3 PFC module)
 1.1.132.1 16-May-2008  yamt sync with head.
 1.1.130.1 18-May-2008  yamt sync with head.
 1.1.128.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 24-Feb-2001  bouyer file pfckbdvar.h was added on branch thorpej_scsipi on 2001-03-12 13:28:51 +0000
 1.8 24-Oct-2021  andvar fix various typos in comments, mainly copypasta.
 1.7 09-Nov-2013  christos fix unused variable warnings
 1.6 12-Feb-2012  matt branches: 1.6.6; 1.6.10;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.5 19-Dec-2009  kiyohara branches: 1.5.12; 1.5.16;
Register null hooks with pmf(9) for now, which is no worse than befor
and allows us to test other things. Power management is still done
via CONFIG_HOOK_POWERCONTROL_LCD.
Based on rev 1.14 of src/sys/arch/hpcsh/dev/j6x0lcd.c
 1.4 31-Mar-2008  kiyohara branches: 1.4.4;
Split device_t/softc.
Use aprint.
 1.3 21-Jan-2007  kiyohara branches: 1.3.44;
follows to style guide and C99.
Add ARGSUSED and __unused.
Remove braces at return.
Use device_private() and aprint_*().
 1.2 11-Dec-2005  christos branches: 1.2.18; 1.2.22;
merge ktrace-lwp.
 1.1 05-Sep-2005  kiyohara branches: 1.1.6;
Support LCD screen driver for PERSONA SH3 machines.
 1.1.6.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.6.1 05-Sep-2005  skrll file psh3lcd.c was added on branch ktrace-lwp on 2005-11-10 13:56:31 +0000
 1.2.22.1 01-Feb-2007  ad Sync with head.
 1.2.18.3 26-Feb-2007  yamt sync with head.
 1.2.18.2 21-Jun-2006  yamt sync with head.
 1.2.18.1 11-Dec-2005  yamt file psh3lcd.c was added on branch yamt-lazymbuf on 2006-06-21 14:52:02 +0000
 1.3.44.1 03-Apr-2008  mjf Sync with HEAD.
 1.4.4.1 11-Mar-2010  yamt sync with head
 1.5.16.1 18-Feb-2012  mrg merge to -current.
 1.5.12.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.12.1 17-Apr-2012  yamt sync with head
 1.6.10.1 18-May-2014  rmind sync with head
 1.6.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8 20-Sep-2024  andvar s/regisiter/register/ in comment.
 1.7 10-May-2024  andvar branches: 1.7.2;
s/covnerter/converter/ in comment.
 1.6 29-Oct-2012  chs fix device/softc split errors.
 1.5 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.4 19-Dec-2009  kiyohara branches: 1.4.12; 1.4.22;
Register with pmf(9), tell it we don't need anything.
Based on rev 1.15 of src/sys/arch/hpcsh/dev/j6x0pwr.c
 1.3 31-Mar-2008  kiyohara branches: 1.3.4;
Split device_t/softc.
Use aprint.
 1.2 24-Sep-2007  kiyohara branches: 1.2.2; 1.2.4; 1.2.6; 1.2.10; 1.2.14; 1.2.28;
Support apm(8).
 1.1 24-Sep-2007  kiyohara Add psh3pwr.
 1.2.28.1 03-Apr-2008  mjf Sync with HEAD.
 1.2.14.2 06-Nov-2007  matt sync with HEAD
 1.2.14.1 24-Sep-2007  matt file psh3pwr.c was added on branch matt-armv6 on 2007-11-06 23:16:59 +0000
 1.2.10.2 27-Oct-2007  yamt sync with head.
 1.2.10.1 24-Sep-2007  yamt file psh3pwr.c was added on branch yamt-lazymbuf on 2007-10-27 11:26:16 +0000
 1.2.6.2 09-Oct-2007  ad Sync with head.
 1.2.6.1 24-Sep-2007  ad file psh3pwr.c was added on branch vmlocking on 2007-10-09 13:37:45 +0000
 1.2.4.2 06-Oct-2007  yamt sync with head.
 1.2.4.1 24-Sep-2007  yamt file psh3pwr.c was added on branch yamt-x86pmap on 2007-10-06 15:35:30 +0000
 1.2.2.2 02-Oct-2007  joerg Sync with HEAD.
 1.2.2.1 24-Sep-2007  joerg file psh3pwr.c was added on branch jmcneill-pm on 2007-10-02 18:27:02 +0000
 1.3.4.1 11-Mar-2010  yamt sync with head
 1.4.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.12.1 30-Oct-2012  yamt sync with head
 1.7.2.1 02-Aug-2025  perseant Sync with HEAD
 1.18 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.17 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.16 24-Apr-2021  thorpej branches: 1.16.8;
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.15 08-Aug-2010  chs branches: 1.15.74;
make this compile with DIAGNOSTIC and PSH3TP_DEBUG.
 1.14 24-Jul-2010  tsutsui Rename some void * arg variables.
"self" implies device_t so it shouldn't be used for void pointers
passed as wsmouse cookie or callout function args.
 1.13 19-Dec-2009  kiyohara branches: 1.13.2; 1.13.4;
Register with pmf(9), tell it we don't need anything.
Based on rev 1.23 of src/sys/arch/hpcsh/dev/j6x0tp.c
 1.12 31-Mar-2008  kiyohara branches: 1.12.4;
Split device_t/softc.
Use aprint.
 1.11 17-Oct-2007  garbled branches: 1.11.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.10 09-Jul-2007  ad branches: 1.10.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.9 04-Mar-2007  christos branches: 1.9.2; 1.9.4; 1.9.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.8 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.7 21-Jan-2007  kiyohara branches: 1.7.2;
follows to style guide and C99.
Add ARGSUSED and __unused.
Remove braces at return.
Use device_private() and aprint_*().
 1.6 12-Nov-2006  plunky Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.5 14-Dec-2005  christos branches: 1.5.20; 1.5.22;
proc -> lwp
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 28-Jun-2005  drochner branches: 1.3.2; 1.3.8;
convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.2 31-May-2005  uwe Use __UNCONST to pass default calibration data to tpcalib_ioctl().
 1.1 23-May-2005  kiyohara Support touch-panel for PERSONA SH3 machines.
 1.3.8.2 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.8.1 28-Jun-2005  skrll file psh3tp.c was added on branch ktrace-lwp on 2005-11-10 13:56:31 +0000
 1.3.2.4 03-Sep-2007  yamt sync with head.
 1.3.2.3 26-Feb-2007  yamt sync with head.
 1.3.2.2 30-Dec-2006  yamt sync with head.
 1.3.2.1 21-Jun-2006  yamt sync with head.
 1.5.22.1 10-Dec-2006  yamt sync with head.
 1.5.20.2 01-Feb-2007  ad Sync with head.
 1.5.20.1 18-Nov-2006  ad Sync with head.
 1.7.2.2 12-Mar-2007  rmind Sync with HEAD.
 1.7.2.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.9.10.1 03-Oct-2007  garbled Sync with HEAD
 1.9.4.1 11-Jul-2007  mjf Sync with head.
 1.9.2.1 15-Jul-2007  ad Sync with head.
 1.10.10.1 06-Nov-2007  matt sync with HEAD
 1.11.16.1 03-Apr-2008  mjf Sync with HEAD.
 1.12.4.2 11-Aug-2010  yamt sync with head.
 1.12.4.1 11-Mar-2010  yamt sync with head
 1.13.4.1 05-Mar-2011  rmind sync with head
 1.13.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.15.74.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.16.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.26 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.25 24-Apr-2021  thorpej branches: 1.25.8;
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.24 19-Jul-2011  dyoung branches: 1.24.68;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark hpcsh/bus.h obsolete.
 1.23 13-May-2010  kiyohara Standby AFE Clock, if use_afeck is 0. Don't stop AFE Clock, if PERSONA boots
on serial console.
 1.22 05-Apr-2009  uwe branches: 1.22.2; 1.22.4;
Register null hooks with pmf(9) for now, which is no worse than before
and allows us to test other things.
 1.21 22-Mar-2009  uwe Don't bother trying to attach GPIO, AFE and FIR modules for which we
have no drivers.

Standby TIMER that we don't use. One of the timers is always out of
standby on my Jornada on boot (WinCE uses it), so save some power.

Standby AFE and FIR for which we have no drivers (I don't know if any
hpcsh hardware actually uses them, so they are likely to be in standby
already anyway).
 1.20 21-Mar-2009  uwe Minor cosmetic.
 1.19 28-Apr-2008  martin branches: 1.19.8; 1.19.14;
Remove clause 3 and 4 from TNF licenses
 1.18 27-Mar-2008  uwe branches: 1.18.2; 1.18.4;
Convert to use CFATTACH_DECL_NEW (no softc).
 1.17 17-Feb-2008  uwe branches: 1.17.6;
hd64461_info: Print correct full name for STBCR (s/system/standby/).
 1.16 18-Dec-2005  uwe branches: 1.16.50; 1.16.56;
Don't include sys/boot_flag.h only to get sys/reboot.h pulled in,
include the latter directly instead. Include hd64461*reg.h only under
DEBUG, where they are used. In hd64461_match use fallthrough.
 1.15 18-Dec-2005  uwe Use ANSI unitN_t types. Use "void" when defining functions with no args.
Propagate "static" to function definitions.
 1.14 11-Dec-2005  christos merge ktrace-lwp.
 1.13 15-Jul-2003  lukem branches: 1.13.16;
__KERNEL_RCSID()
 1.12 01-Jan-2003  thorpej branches: 1.12.2;
Use aprint_normal() for cfprint routines.
 1.11 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.10 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.7 28-Mar-2002  uch branches: 1.7.6;
rework HD64461, HD64465 interrupt handling.
 1.6 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.5 17-Feb-2002  uch SH3/SH4 common kernel support.
 1.4 29-Jan-2002  uch clean up debug print and configuration.
 1.3 27-Jan-2002  uch clean up debug print and configuration.
 1.2 13-Jul-2001  uch cosmetic changes.
 1.1 21-Feb-2001  uch branches: 1.1.4; 1.1.6;
HD64461 driver (SH3 companion chip for Windows CE)
 1.1.6.5 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.4 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.3 16-Mar-2002  jdolecek Catch up with -current.
 1.1.6.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.6.1 03-Aug-2001  lukem update to -current
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 21-Feb-2001  bouyer file hd64461.c was added on branch thorpej_scsipi on 2001-03-12 13:28:51 +0000
 1.7.6.3 03-Jan-2003  thorpej Sync with HEAD.
 1.7.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.7.6.1 28-Mar-2002  nathanw file hd64461.c was added on branch nathanw_sa on 2002-10-18 02:37:22 +0000
 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 03-Aug-2004  skrll Sync with HEAD
 1.13.16.2 27-Feb-2008  yamt sync with head.
 1.13.16.1 21-Jun-2006  yamt sync with head.
 1.16.56.1 18-Feb-2008  mjf Sync with HEAD.
 1.16.50.1 23-Mar-2008  matt sync with HEAD
 1.17.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.17.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.18.4.3 11-Aug-2010  yamt sync with head.
 1.18.4.2 04-May-2009  yamt sync with head.
 1.18.4.1 16-May-2008  yamt sync with head.
 1.18.2.1 18-May-2008  yamt sync with head.
 1.19.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.19.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.22.4.1 30-May-2010  rmind sync with head
 1.22.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.24.68.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.25.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.7 09-Nov-2013  christos fix unused variable warnings
 1.6 19-Jul-2011  dyoung branches: 1.6.2; 1.6.12; 1.6.16;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark hpcsh/bus.h obsolete.
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 18-Dec-2005  uwe branches: 1.4.74; 1.4.76; 1.4.78;
Use ANSI uintN_t types.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 03-Mar-2002  uch branches: 1.1.4; 1.1.12; 1.1.18;
platform dependent HD64461 PCMCIA module (power supply).
 1.1.18.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.18.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.18.1 03-Aug-2004  skrll Sync with HEAD
 1.1.12.2 03-Mar-2002  uch platform dependent HD64461 PCMCIA module (power supply).
 1.1.12.1 03-Mar-2002  uch file hd64461_machdep.c was added on branch nathanw_sa on 2002-03-03 14:34:03 +0000
 1.1.4.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.1 03-Mar-2002  jdolecek file hd64461_machdep.c was added on branch kqueue on 2002-03-16 15:58:05 +0000
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.4.78.1 16-May-2008  yamt sync with head.
 1.4.76.1 18-May-2008  yamt sync with head.
 1.4.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.16.1 18-May-2014  rmind sync with head
 1.6.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 18-Dec-2005  uwe branches: 1.2.74; 1.2.76; 1.2.78;
Multiple-inclusion protection.
 1.1 21-Feb-2001  uch branches: 1.1.4; 1.1.42;
HD64461 driver (SH3 companion chip for Windows CE)
 1.1.42.1 21-Jun-2006  yamt sync with head.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 21-Feb-2001  bouyer file hd64461gpioreg.h was added on branch thorpej_scsipi on 2001-03-12 13:28:51 +0000
 1.2.78.1 16-May-2008  yamt sync with head.
 1.2.76.1 18-May-2008  yamt sync with head.
 1.2.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 18-Dec-2005  uwe branches: 1.2.74; 1.2.76; 1.2.78;
Multiple-inclusion protection.
 1.1 21-Feb-2001  uch branches: 1.1.4; 1.1.42;
HD64461 driver (SH3 companion chip for Windows CE)
 1.1.42.1 21-Jun-2006  yamt sync with head.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 21-Feb-2001  bouyer file hd64461intcreg.h was added on branch thorpej_scsipi on 2001-03-12 13:28:51 +0000
 1.2.78.1 16-May-2008  yamt sync with head.
 1.2.76.1 18-May-2008  yamt sync with head.
 1.2.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 28-Mar-2002  uch branches: 1.3.4;
rework HD64461, HD64465 interrupt handling.
 1.2 11-Feb-2002  uch KNF
 1.1 21-Feb-2001  uch branches: 1.1.4; 1.1.6;
HD64461 driver (SH3 companion chip for Windows CE)
 1.1.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 21-Feb-2001  bouyer file hd64461intcvar.h was added on branch thorpej_scsipi on 2001-03-12 13:28:51 +0000
 1.3.4.2 28-Mar-2002  uch rework HD64461, HD64465 interrupt handling.
 1.3.4.1 28-Mar-2002  uch file hd64461intcvar.h was added on branch nathanw_sa on 2002-03-28 15:27:01 +0000
 1.57 06-Aug-2025  andvar s/attibute/attribute/ and s/previosly/previously/ in comments.
 1.56 02-Jun-2024  andvar fix various typos in word `interrupt', mainly in comments.
 1.55 11-Oct-2021  rin Fix workaround for SH-3 PCMCIA bug in accordance with description
found in TECH I vol. 14 (CQ Publishing, Tokyo, 2002, in Japanese),
as well as experiment on real hardware:

Byte-access to area 6 becomes word-access (both CE1# and CE2# are
wrongly asserted), if preceding access is word-wise. Inserting a
dummy byte-access works around the problem. Area 5 is not affected.

Therefore,

(1) Insert a dummy byte-read before all byte-wise operations.

(2) Restrict the workaround to area 6 (channel 0), and rename
fixup_sh3_pcmcia_area() to fixup_sh3_pcmcia_area6() for clarity.

Also, we used to use 0xba000000 (== HD64461_PCC0_IOBASE) as target
for the dummy read. However, this can modify device states, which
breaks ep(4) at least. Thus,

(3) Use HD64461_PCC0_MEMBASE as target for the dummy read. This is
assigned to attribute memory space, and byte-read should be
harmless.
 1.54 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.53 24-Apr-2021  thorpej branches: 1.53.8;
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.52 21-Nov-2020  thorpej branches: 1.52.2;
malloc(9) -> kmem(9)
 1.51 09-Nov-2013  christos branches: 1.51.42;
fix unused variable warnings
 1.50 13-Oct-2013  riz Catch up to recent changes in config_pending_{incr,decr}().
 1.49 26-Jul-2011  dyoung branches: 1.49.2; 1.49.12; 1.49.16;
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.
 1.48 20-Jul-2011  dyoung Move macros _BUS_SPACE_WRITE(), _BUS_SPACE_WRITE_MULTI(), et
cetera, into <hpcsh/bus_util.h> for both hpcsh/bus_space.c and
dev/hd64461/hd64461pcmcia.c to use them.

(I haven't had a close look at what hd64461pcmcia.c is doing, but I have
a hunch that it is a good use for bus_space_tag_create(9).)
 1.47 19-Jul-2011  dyoung Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark hpcsh/bus.h obsolete.
 1.46 05-Apr-2009  uwe Register null hooks with pmf(9) for now, which is no worse than before
and allows us to test other things.
 1.45 21-Mar-2009  uwe In the current code the even loop is never exited, but it's cleaner to
have explicit kthread_exit at the end of the event thread routine.
 1.44 21-Mar-2009  uwe Move channel attachment to event thread (we already have one, so it's
easier to do it there rather than mess with config_interrupts()).

From kiyohara@. Discussed with drochner@, who pointed out that pcmcia
drivers are expected to attach with interrupts enabled.
 1.43 28-Apr-2008  martin branches: 1.43.8; 1.43.14;
Remove clause 3 and 4 from TNF licenses
 1.42 27-Mar-2008  uwe branches: 1.42.2; 1.42.4;
Split device_t and softc.
 1.41 17-Feb-2008  uwe branches: 1.41.6;
Use aprint_*, device_xname.
 1.40 17-Feb-2008  uwe hd64461_set_bus_width - use named constants instead of bit shift magic.
 1.39 15-Dec-2007  perry __FUNCTION__ -> __func__
 1.38 17-Oct-2007  garbled branches: 1.38.2; 1.38.4; 1.38.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.37 11-Jul-2007  uwe branches: 1.37.10;
Fix previous: sc_event_thread should be a pointer to lwp_t.
 1.36 09-Jul-2007  ad Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.35 03-Jan-2006  uwe branches: 1.35.28; 1.35.30; 1.35.36;
Fix constification fallout under #ifdef HD64461PCMCIA_DEBUG.
 1.34 03-Jan-2006  uwe HD64461PCMCIA options now come from "opt_hd64461pcmcia.h".
 1.33 18-Dec-2005  uwe branches: 1.33.2;
Use ANSI uintN_t types. Propagate "static" to function definitions.
 1.32 11-Dec-2005  christos merge ktrace-lwp.
 1.31 26-Aug-2005  drochner s/locdesc_t/int/g
 1.30 28-Jun-2005  drochner branches: 1.30.2;
convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.29 11-Aug-2004  mycroft Forget to reset to memory mode on power up.
The hd64465 looks a bit incomplete, but "not my problem".
 1.28 11-Aug-2004  mycroft Attempt to fix these up, but I have no way to test them.
 1.27 14-Jul-2004  uch enable to power off and reset card.
 1.26 11-Jul-2004  uch cosmetic changes. (whitespace,<tab>)
 1.25 27-Mar-2004  uwe When we attach a channel, set a high level to DRV control pin of the
external buffer for the PC card connected to the channel. This hack
makes pcmcia cards "being used" at the boot time (by WinCE or NetBSD)
correctly detected. A machine running with root on NFS can now be
properly rebooted.
 1.24 27-Mar-2004  uwe Add option HD64461PCMCIA_REORDER_ATTACH that attaches channels in
reversed order.

When you boot with two CF cards inserted, this options makes the one
in the "memory only" slot (channel 1), which is almost always the card
with the NetBSD install, attached as wd0.

Unlike using fixed unit numbers in the kernel config, if you boot with
only a single CF card, that single card will still be wd0 regardless
of which slot it is inserted in.

http://mail-index.netbsd.org/port-hpcsh/2003/10/23/0000.html provides
a more verbose description of why this option is convenient for most
usage patterns.
 1.23 23-Oct-2003  uwe In hd64461pcmcia_chip_io_map set *windowp to 0.

This driver ignores i/o window handle, but most 'at pcmcia'
attachments init their sc_io_window to -1 and then check at detach
time if it was changed from the "bad" value. Keep them happy, so that
they can correctly clean up when card is detached.
 1.22 15-Jul-2003  lukem __KERNEL_RCSID()
 1.21 01-Jan-2003  thorpej branches: 1.21.2;
Use aprint_normal() for cfprint routines.
 1.20 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.19 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.18 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.17 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.16 01-Jun-2002  lukem branches: 1.16.2;
SIMPLEQ rototill:
- 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
 1.15 28-Mar-2002  uch branches: 1.15.2;
rework HD64461, HD64465 interrupt handling.
 1.14 03-Mar-2002  uch platform dependent HD64461 PCMCIA module (power supply).
 1.13 28-Feb-2002  uch Cleanup register definition
 1.12 17-Feb-2002  uch SH3/SH4 common kernel support.
 1.11 11-Feb-2002  uch {} -> do {} (0)
 1.10 29-Jan-2002  uch clean up debug print and configuration.
 1.9 27-Jan-2002  uch clean up debug print and configuration.
 1.8 15-Dec-2001  soren To make dev/pcmcia work on platforms with 64-bit bus_addr_t and
32-bit bus_size_t (sparc), change the pcmcia_mem_map(9) offsetp
argument to bus_size_t as it is used as a bus_space offset.
 1.7 08-Oct-2001  uch HITACHI PERSONA support. patch by KIYOHARA Takashi
 1.6 13-Jul-2001  uch branches: 1.6.2;
cosmetic changes.
 1.5 13-Jul-2001  uch fix interrupt, voltage supply bug of channel 1.
(patch by Masanori Kanaoka).
 1.4 04-Jul-2001  uch branches: 1.4.2;
#ifdef notyet power on/off sequence code. it doesn't work.
 1.3 15-Mar-2001  uch HD64461 UART module support.
 1.2 08-Mar-2001  uch branches: 1.2.2;
channel 1 interface don't provide fake pcmcia io space tag.
 1.1 21-Feb-2001  uch branches: 1.1.2;
HD64461 driver (SH3 companion chip for Windows CE)
 1.1.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.2.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.2.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.2.2.1 08-Mar-2001  bouyer file hd64461pcmcia.c was added on branch thorpej_scsipi on 2001-03-12 13:28:52 +0000
 1.4.2.6 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.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.4.2.4 16-Mar-2002  jdolecek Catch up with -current.
 1.4.2.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.1 03-Aug-2001  lukem update to -current
 1.6.2.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.15.2.1 14-Jul-2002  gehenna catch up with -current.
 1.16.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.16.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.16.2.1 01-Jun-2002  nathanw file hd64461pcmcia.c was added on branch nathanw_sa on 2002-10-18 02:37:23 +0000
 1.21.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.21.2.2 12-Aug-2004  skrll Sync with HEAD.
 1.21.2.1 03-Aug-2004  skrll Sync with HEAD
 1.30.2.4 27-Feb-2008  yamt sync with head.
 1.30.2.3 21-Jan-2008  yamt sync with head
 1.30.2.2 03-Sep-2007  yamt sync with head.
 1.30.2.1 21-Jun-2006  yamt sync with head.
 1.33.2.1 15-Jan-2006  yamt sync with head.
 1.35.36.1 03-Oct-2007  garbled Sync with HEAD
 1.35.30.1 11-Jul-2007  mjf Sync with head.
 1.35.28.1 15-Jul-2007  ad Sync with head.
 1.37.10.3 23-Mar-2008  matt sync with HEAD
 1.37.10.2 09-Jan-2008  matt sync with HEAD
 1.37.10.1 06-Nov-2007  matt sync with HEAD
 1.38.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.38.4.1 26-Dec-2007  ad Sync with head.
 1.38.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.41.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.41.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.42.4.2 04-May-2009  yamt sync with head.
 1.42.4.1 16-May-2008  yamt sync with head.
 1.42.2.1 18-May-2008  yamt sync with head.
 1.43.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.43.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.49.16.1 18-May-2014  rmind sync with head
 1.49.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.49.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.51.42.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.52.2.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.52.2.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.53.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 18-Dec-2005  uwe branches: 1.3.74; 1.3.76; 1.3.78;
Multiple-inclusion protection.
 1.2 08-Oct-2001  uch branches: 1.2.14; 1.2.36;
HITACHI PERSONA support. patch by KIYOHARA Takashi
 1.1 21-Feb-2001  uch branches: 1.1.2; 1.1.4; 1.1.6;
HD64461 driver (SH3 companion chip for Windows CE)
 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 21-Feb-2001  bouyer file hd64461pcmciareg.h was added on branch thorpej_scsipi on 2001-03-12 13:28:52 +0000
 1.1.2.1 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.2.36.1 21-Jun-2006  yamt sync with head.
 1.2.14.2 08-Oct-2001  uch HITACHI PERSONA support. patch by KIYOHARA Takashi
 1.2.14.1 08-Oct-2001  uch file hd64461pcmciareg.h was added on branch nathanw_sa on 2001-10-08 15:34:25 +0000
 1.3.78.1 16-May-2008  yamt sync with head.
 1.3.76.1 18-May-2008  yamt sync with head.
 1.3.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 18-Dec-2005  uwe branches: 1.2.74; 1.2.76; 1.2.78;
Multiple-inclusion protection.
 1.1 03-Mar-2002  uch branches: 1.1.4; 1.1.12; 1.1.34;
platform dependent HD64461 PCMCIA module (power supply).
 1.1.34.1 21-Jun-2006  yamt sync with head.
 1.1.12.2 03-Mar-2002  uch platform dependent HD64461 PCMCIA module (power supply).
 1.1.12.1 03-Mar-2002  uch file hd64461pcmciavar.h was added on branch nathanw_sa on 2002-03-03 14:34:02 +0000
 1.1.4.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.1 03-Mar-2002  jdolecek file hd64461pcmciavar.h was added on branch kqueue on 2002-03-16 15:58:05 +0000
 1.2.78.1 16-May-2008  yamt sync with head.
 1.2.76.1 18-May-2008  yamt sync with head.
 1.2.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 18-Dec-2005  uwe branches: 1.3.74; 1.3.76; 1.3.78;
Multiple-inclusion protection.
 1.2 04-Jun-2001  uch branches: 1.2.18; 1.2.40;
HD64461 video module.
 1.1 21-Feb-2001  uch branches: 1.1.2; 1.1.4;
HD64461 driver (SH3 companion chip for Windows CE)
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 21-Feb-2001  bouyer file hd64461reg.h was added on branch thorpej_scsipi on 2001-03-12 13:28:52 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.40.1 21-Jun-2006  yamt sync with head.
 1.2.18.2 04-Jun-2001  uch HD64461 video module.
 1.2.18.1 04-Jun-2001  uch file hd64461reg.h was added on branch nathanw_sa on 2001-06-04 17:08:37 +0000
 1.3.78.1 16-May-2008  yamt sync with head.
 1.3.76.1 18-May-2008  yamt sync with head.
 1.3.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.32 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.31 13-Sep-2023  andvar change hd64461uart_init_regs third argument from NULL to 0x0,
since compiler complains about making integer from pointer without cast.

fully fixes KGDB enabled build for hpcsh.
 1.30 11-Dec-2018  thorpej Add a convenience function, com_init_regs_stride(), that shifts the register
offsets and size by the specified amount. Use in front-ends as appropriate.
 1.29 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.28 19-Jul-2011  dyoung branches: 1.28.52; 1.28.54;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark hpcsh/bus.h obsolete.
 1.27 13-May-2010  kiyohara Use COM_REGMAP instead of hd64461uart_{read,write}_1().
 1.26 13-May-2010  kiyohara Standby AFE Clock, if use_afeck is 0. Don't stop AFE Clock, if PERSONA boots
on serial console.
 1.25 12-May-2010  kiyohara Style.
 1.24 12-May-2010  kiyohara Suply clock SAFECKE_[IO]ST, if platid is PERSONA.
tested on HPW-50PA.
 1.23 12-May-2010  kiyohara Fix arg of intr_establish().
comintr() expects struct com_softc* for arg.
 1.22 28-Apr-2008  martin branches: 1.22.20; 1.22.22;
Remove clause 3 and 4 from TNF licenses
 1.21 14-Mar-2008  cube branches: 1.21.2; 1.21.4;
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.20 15-Dec-2007  perry branches: 1.20.2; 1.20.6;
__FUNCTION__ -> __func__
 1.19 13-Jul-2006  gdamore branches: 1.19.34; 1.19.44; 1.19.48;
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.18 18-Dec-2005  uwe branches: 1.18.4; 1.18.8; 1.18.16;
Use ANSI uintN_t types. Use "volatile" without extra __'s.
Use "void" in definitions of functions without arguments.
Propagate "static" do function definitions.
 1.17 11-Dec-2005  christos merge ktrace-lwp.
 1.16 15-Jul-2003  lukem branches: 1.16.16;
__KERNEL_RCSID()
 1.15 14-Jun-2003  thorpej branches: 1.15.2;
Also pass a type argument to comcnattach() and com_kgdb_attach().
comspeed() (and thus cominit()) may need this information.
 1.14 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.13 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.12 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.11 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.10 28-Mar-2002  uch branches: 1.10.2; 1.10.6;
rework HD64461, HD64465 interrupt handling.
 1.9 03-Mar-2002  uch don't initialize twice
 1.8 02-Mar-2002  uch Initial support for KGDB on the sh3.
 1.7 11-Feb-2002  uch add primitive serial console debug routine.
 1.6 29-Jan-2002  uch clean up debug print and configuration.
 1.5 27-Jan-2002  uch clean up debug print and configuration.
 1.4 14-Sep-2001  uch debug printf change.
 1.3 13-Jul-2001  uch branches: 1.3.2;
cosmetic changes.
 1.2 20-Mar-2001  uch branches: 1.2.2; 1.2.4; 1.2.6;
make HD64461 UART module usable on HITACHI PERSONA
 1.1 15-Mar-2001  uch HD64461 UART module support.
 1.2.6.6 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.6.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.6.4 16-Mar-2002  jdolecek Catch up with -current.
 1.2.6.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.6.1 03-Aug-2001  lukem update to -current
 1.2.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.2.2.2 27-Mar-2001  bouyer Sync with HEAD.
 1.2.2.1 20-Mar-2001  bouyer file hd64461uart.c was added on branch thorpej_scsipi on 2001-03-27 15:30:58 +0000
 1.3.2.1 01-Oct-2001  fvdl Catch up with -current.
 1.10.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.10.6.2 17-Sep-2002  nathanw Catch up to -current.
 1.10.6.1 28-Mar-2002  nathanw file hd64461uart.c was added on branch nathanw_sa on 2002-09-17 21:14:52 +0000
 1.10.2.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.15.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.15.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.16.4 17-Mar-2008  yamt sync with head.
 1.16.16.3 21-Jan-2008  yamt sync with head
 1.16.16.2 30-Dec-2006  yamt sync with head.
 1.16.16.1 21-Jun-2006  yamt sync with head.
 1.18.16.1 16-Jun-2006  gdamore Conver hpcsh com attachments to new com(4) framework.
 1.18.8.1 11-Aug-2006  yamt sync with head
 1.18.4.1 09-Sep-2006  rpaulo sync with head
 1.19.48.1 02-Jan-2008  bouyer Sync with HEAD
 1.19.44.1 26-Dec-2007  ad Sync with head.
 1.19.34.2 23-Mar-2008  matt sync with HEAD
 1.19.34.1 09-Jan-2008  matt sync with HEAD
 1.20.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.20.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.20.2.1 24-Mar-2008  keiichi sync with head.
 1.21.4.2 11-Aug-2010  yamt sync with head.
 1.21.4.1 16-May-2008  yamt sync with head.
 1.21.2.1 18-May-2008  yamt sync with head.
 1.22.22.1 30-May-2010  rmind sync with head
 1.22.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.28.54.1 10-Jun-2019  christos Sync with HEAD
 1.28.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 18-Dec-2005  uwe branches: 1.4.74; 1.4.76; 1.4.78;
Multiple-inclusion protection.
 1.3 11-Feb-2002  uch branches: 1.3.12; 1.3.34;
add primitive serial console debug routine.
 1.2 19-Apr-2001  uch branches: 1.2.2;
fix comment.
 1.1 20-Mar-2001  uch branches: 1.1.2; 1.1.4;
make HD64461 UART module usable on HITACHI PERSONA
 1.1.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.1.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.2.3 23-Apr-2001  bouyer Sync with HEAD.
 1.1.2.2 27-Mar-2001  bouyer Sync with HEAD.
 1.1.2.1 20-Mar-2001  bouyer file hd64461uartreg.h was added on branch thorpej_scsipi on 2001-03-27 15:30:58 +0000
 1.2.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.3.34.1 21-Jun-2006  yamt sync with head.
 1.3.12.2 11-Feb-2002  uch add primitive serial console debug routine.
 1.3.12.1 11-Feb-2002  uch file hd64461uartreg.h was added on branch nathanw_sa on 2002-02-11 17:21:49 +0000
 1.4.78.1 16-May-2008  yamt sync with head.
 1.4.76.1 18-May-2008  yamt sync with head.
 1.4.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 18-Dec-2005  uwe branches: 1.5.74; 1.5.76; 1.5.78;
Multiple-inclusion protection. Use ANSI uintN_t types. Fix few
whitespace nits. Add "extern" to function declarations. Drop LOCORE
protection, this file is not included in any asm sources, it has
nothing interesting for asm sources anyway.
 1.4 02-Mar-2002  uch branches: 1.4.10; 1.4.32;
Initial support for KGDB on the sh3.
 1.3 11-Feb-2002  uch add primitive serial console debug routine.
 1.2 19-Apr-2001  uch branches: 1.2.2;
remove non-existent function declaration.
 1.1 15-Mar-2001  uch branches: 1.1.2; 1.1.4;
HD64461 UART module support.
 1.1.4.2 21-Jun-2001  nathanw Catch up to -current.
 1.1.4.1 09-Apr-2001  nathanw Catch up with -current.
 1.1.2.3 23-Apr-2001  bouyer Sync with HEAD.
 1.1.2.2 27-Mar-2001  bouyer Sync with HEAD.
 1.1.2.1 15-Mar-2001  bouyer file hd64461uartvar.h was added on branch thorpej_scsipi on 2001-03-27 15:30:58 +0000
 1.2.2.1 16-Mar-2002  jdolecek Catch up with -current.
 1.4.32.1 21-Jun-2006  yamt sync with head.
 1.4.10.2 02-Mar-2002  uch Initial support for KGDB on the sh3.
 1.4.10.1 02-Mar-2002  uch file hd64461uartvar.h was added on branch nathanw_sa on 2002-03-02 22:26:27 +0000
 1.5.78.1 16-May-2008  yamt sync with head.
 1.5.76.1 18-May-2008  yamt sync with head.
 1.5.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.5 13-May-2010  kiyohara Standby AFE Clock, if use_afeck is 0. Don't stop AFE Clock, if PERSONA boots
on serial console.
 1.4 28-Apr-2008  martin branches: 1.4.20; 1.4.22;
Remove clause 3 and 4 from TNF licenses
 1.3 18-Dec-2005  uwe branches: 1.3.74; 1.3.76; 1.3.78;
Use ANSI unitN_t types.
 1.2 28-Mar-2002  uch branches: 1.2.6; 1.2.28;
rework HD64461, HD64465 interrupt handling.
 1.1 21-Feb-2001  uch branches: 1.1.4; 1.1.6;
HD64461 driver (SH3 companion chip for Windows CE)
 1.1.6.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 21-Feb-2001  bouyer file hd64461var.h was added on branch thorpej_scsipi on 2001-03-12 13:28:52 +0000
 1.2.28.1 21-Jun-2006  yamt sync with head.
 1.2.6.2 28-Mar-2002  uch rework HD64461, HD64465 interrupt handling.
 1.2.6.1 28-Mar-2002  uch file hd64461var.h was added on branch nathanw_sa on 2002-03-28 15:27:02 +0000
 1.3.78.2 11-Aug-2010  yamt sync with head.
 1.3.78.1 16-May-2008  yamt sync with head.
 1.3.76.1 18-May-2008  yamt sync with head.
 1.3.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.22.1 30-May-2010  rmind sync with head
 1.4.20.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.58 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.57 03-Jul-2022  andvar fix various typos in comments, mainly s/pallete/palette/.
 1.56 24-May-2022  andvar fix various typos in comments, docs and log messages.
 1.55 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.54 24-Apr-2021  thorpej branches: 1.54.8;
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.53 19-Jul-2011  dyoung branches: 1.53.68;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark hpcsh/bus.h obsolete.
 1.52 05-Apr-2009  uwe Register null hooks with pmf(9) for now, which is no worse than before
and allows us to test other things.
 1.51 18-Mar-2009  uwe Turn on display on attachment. Fixes the scenario when serial console
is used and you reboot (using kloader) with screen turned off.
 1.50 02-Dec-2008  uwe branches: 1.50.4;
Defining another variable after multiline initializer for a previous
one in the same definition is very confusing visually. Change order.
 1.49 02-Dec-2008  uwe Spell "gray scale" and "mono chrome" without the space.
 1.48 02-Dec-2008  uwe hd64461video_set_display_mode_lcdc - expressing screen widths in hex
hardly helps readbility. Express them in terms on 640*x or 640/x.
 1.47 02-Dec-2008  uwe hd64461video_info: fix pasto, correctly report 4-bit grayscale in LDR2.
 1.46 28-Apr-2008  martin branches: 1.46.6; 1.46.8;
Remove clause 3 and 4 from TNF licenses
 1.45 28-Mar-2008  uwe branches: 1.45.2; 1.45.4;
Split device_t and softc.
 1.44 15-Dec-2007  perry branches: 1.44.6;
__FUNCTION__ -> __func__
 1.43 17-Oct-2007  garbled branches: 1.43.4; 1.43.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.42 24-Sep-2007  kiyohara Add psh3pwr.
 1.41 09-Jul-2007  ad branches: 1.41.8; 1.41.10; 1.41.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.40 04-Mar-2007  christos branches: 1.40.2; 1.40.4; 1.40.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.39 22-Feb-2007  thorpej TRUE -> true, FALSE -> false
 1.38 21-Feb-2007  thorpej Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.37 18-Aug-2006  uwe branches: 1.37.8;
Refer sc_font.wsfont explicitly instead of playing cast tricks.
 1.36 14-Aug-2006  uwe Whether hd64461video is console is not is irrelevant to powering it up
on PWR_RESUME. Drop that bogus test and check whether the screen was
blanked instead to corerctly reflect blanked status across suspends.
 1.35 03-Jan-2006  uwe branches: 1.35.2; 1.35.6;
HD64461VIDEO options now come from "opt_hd64461video.h".
 1.34 18-Dec-2005  uwe branches: 1.34.2;
Use explicit "continue" for busy loop bodies in a couple of places I
missed in the previous commit.
 1.33 18-Dec-2005  uwe Use ANSI uintN_t types. Use "void" in definitions of functions
without arguments. Propagate "static" to function definitions.
Declare local functions static. Hide acceleration code inside ifdef
HD64461VIDEO_HWACCEL (save more than 1K of text).
 1.32 11-Dec-2005  christos merge ktrace-lwp.
 1.31 04-Sep-2005  uwe Tell hpcfb that framebuffer fetches 16-bit pixels as little endian.
 1.30 26-Mar-2005  uwe branches: 1.30.2;
Improve spelling in debug printfs.
 1.29 28-Feb-2005  uwe branches: 1.29.2;
Propagate WSDISPLAYIO_PARAM_BACKLIGHT to config hooks.
 1.28 12-Dec-2004  abs branches: 1.28.2; 1.28.4;
Fix comments regarding configration bounaries
 1.27 03-Jul-2004  uch jornada 6x0 power mannagement support.
[on/off] button power off LCD and CPU sleeps.
 1.26 04-Jun-2004  uch fix hd64461video_get_clut.
 1.25 15-Mar-2004  uwe branches: 1.25.4;
Use CONFIG_HOOK_POWERCONTROL_LCD to control turning the LCD on/off
(the _LCDLIGHT hook is apparently meant to control the LCD backlight).
 1.24 15-Mar-2004  uwe Support for WSDISPLAYIO_PARAM_CONTRAST.
 1.23 14-Dec-2003  uwe Use CONFIG_HOOK_BRIGHTNESS* to support WSDISPLAYIO_PARAM_BRIGHTNESS.
Use CONFIG_HOOK_POWERCONTROL_LCDLIGHT to turn on/off the LCD in
response to WSDISPLAYIO_SVIDEO.

Implementation of these hooks for Jornada 680 is to follow shortly.
 1.22 13-Nov-2003  chs eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
 1.21 09-Nov-2003  uwe Implement trivial WSDISPLAYIO_SVIDEO that flips DON bit in LCDLDR1.
This only turns off the display in the LCD controller.

TODO: Need to add a platform specific way to turn the screen on and
off as well (e.g. on Jornada 680 this is bit 0 in hd64461 GPIO port B).
 1.20 01-Nov-2003  uwe In hd64461video_update_videochip_status init depth to supress bogus
-Wuninitialized.
 1.19 02-Aug-2003  uwe Move the definition of enum hd64461video_display_mode out of the
definition of struct hd64461video_chip. Makes gcc3 happy.
 1.18 15-Jul-2003  lukem __KERNEL_RCSID()
 1.17 27-Apr-2003  uwe branches: 1.17.2;
When doing bit blit, set the flow direction based on the condition_a flag.
 1.16 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.15 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.14 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.12 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.11 03-May-2002  takemura branches: 1.11.2; 1.11.6;
Fixed debug print.
 1.10 13-Apr-2002  takemura Fixed dev/hpc/hpcfb.c to set RI_BSWAP flag in 8bpp for rasops8.c
and backout changes 'fix LCD byte-order setting':
arch/hpcsh/dev/hd64461/hd64461video.c Rev. 1.7 to 1.8
arch/hpcmips/dev/plumvideo.c Rev. 1.23 to 1.24
arch/hpcmips/tx/tx3912video.c Rev. 1.24 to 1.25
 1.9 17-Mar-2002  atatat Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.8 19-Feb-2002  uch fix LCD byte-order setting.
 1.7 29-Jan-2002  uch clean up debug print and configuration.
 1.6 27-Jan-2002  uch clean up debug print and configuration.
 1.5 05-Dec-2001  atatat Use more parentheses to make the compiler happy.
 1.4 05-Aug-2001  jdolecek use unsigned variable types as appropriate
 1.3 22-Jul-2001  takemura You must set 'HPCFB_SWAP_*' if bytes are stored in reverse order, i.e.
little endian like order, however, usage of 'HPCFB_SWAP_*' was widely
misunderstood because it reminded you of 'RI_BSWAP' in raster operation.
Please note that 'RI_BSWAP' indicate that frame buffer byte order is different
from natural order of system while 'HPCFB_REVORDER_*' is independent of
system byte order.
 1.2 05-Jun-2001  uch branches: 1.2.2; 1.2.4;
HD64461 frame buffer is big-endian. set HPCFB_SWAP_BYTE.
 1.1 04-Jun-2001  uch HD64461 video module.
 1.2.4.7 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.4.6 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.4.5 16-Mar-2002  jdolecek Catch up with -current.
 1.2.4.4 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.4.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.2.4.1 03-Aug-2001  lukem update to -current
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.11.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.11.6.2 17-Sep-2002  nathanw Catch up to -current.
 1.11.6.1 03-May-2002  nathanw file hd64461video.c was added on branch nathanw_sa on 2002-09-17 21:14:53 +0000
 1.11.2.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.17.2.8 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.17.2.7 01-Apr-2005  skrll Sync with HEAD.
 1.17.2.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.17.2.5 24-Jan-2005  skrll Adapt to branch.
 1.17.2.4 18-Dec-2004  skrll Sync with HEAD.
 1.17.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.2.1 03-Aug-2004  skrll Sync with HEAD
 1.25.4.1 11-May-2005  riz Pull up revision 1.26 (requested by uwe in ticket #1415):
fix hd64461video_get_clut.
 1.28.4.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.28.2.1 29-Apr-2005  kent sync with -current
 1.29.2.1 15-Sep-2005  tron Pull up following revision(s) (requested by uwe in ticket #781):
sys/arch/hpcsh/dev/hd64461/hd64461video.c: revision 1.31
Tell hpcfb that framebuffer fetches 16-bit pixels as little enidan.
 1.30.2.6 21-Jan-2008  yamt sync with head
 1.30.2.5 27-Oct-2007  yamt sync with head.
 1.30.2.4 03-Sep-2007  yamt sync with head.
 1.30.2.3 26-Feb-2007  yamt sync with head.
 1.30.2.2 30-Dec-2006  yamt sync with head.
 1.30.2.1 21-Jun-2006  yamt sync with head.
 1.34.2.1 15-Jan-2006  yamt sync with head.
 1.35.6.1 03-Sep-2006  yamt sync with head.
 1.35.2.1 09-Sep-2006  rpaulo sync with head
 1.37.8.2 12-Mar-2007  rmind Sync with HEAD.
 1.37.8.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.40.10.1 03-Oct-2007  garbled Sync with HEAD
 1.40.4.1 11-Jul-2007  mjf Sync with head.
 1.40.2.2 09-Oct-2007  ad Sync with head.
 1.40.2.1 15-Jul-2007  ad Sync with head.
 1.41.12.1 06-Oct-2007  yamt sync with head.
 1.41.10.2 09-Jan-2008  matt sync with HEAD
 1.41.10.1 06-Nov-2007  matt sync with HEAD
 1.41.8.1 02-Oct-2007  joerg Sync with HEAD.
 1.43.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.43.4.1 26-Dec-2007  ad Sync with head.
 1.44.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.44.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.44.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.45.4.2 04-May-2009  yamt sync with head.
 1.45.4.1 16-May-2008  yamt sync with head.
 1.45.2.1 18-May-2008  yamt sync with head.
 1.46.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.46.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.46.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.50.4.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.53.68.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.54.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 11-Apr-2019  kamil Fix a typo in a comment

NFCI
 1.4 28-Apr-2008  martin branches: 1.4.88;
Remove clause 3 and 4 from TNF licenses
 1.3 08-Mar-2006  lukem branches: 1.3.64; 1.3.66; 1.3.68;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.2 18-Dec-2005  uwe branches: 1.2.4; 1.2.6; 1.2.8; 1.2.10;
Multiple-inclusion protection.
 1.1 04-Jun-2001  uch branches: 1.1.2; 1.1.20; 1.1.42;
HD64461 video module.
 1.1.42.1 21-Jun-2006  yamt sync with head.
 1.1.20.2 04-Jun-2001  uch HD64461 video module.
 1.1.20.1 04-Jun-2001  uch file hd64461videoreg.h was added on branch nathanw_sa on 2001-06-04 17:08:37 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.2.8.1 13-Mar-2006  yamt sync with head.
 1.2.6.1 22-Apr-2006  simonb Sync with head.
 1.2.4.1 09-Sep-2006  rpaulo sync with head
 1.3.68.1 16-May-2008  yamt sync with head.
 1.3.66.1 18-May-2008  yamt sync with head.
 1.3.64.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.88.1 10-Jun-2019  christos Sync with HEAD
 1.19 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.18 24-Apr-2021  thorpej branches: 1.18.8;
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.17 27-Oct-2012  chs branches: 1.17.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.16 12-Feb-2012  matt branches: 1.16.6;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.15 19-Jul-2011  dyoung branches: 1.15.2; 1.15.6;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark hpcsh/bus.h obsolete.
 1.14 06-Jun-2011  matt CFATTACH_DECL(..., sizeof(struct device), -> CFATTACH_DECL_NEW(..., 0
struct device * -> device_t
struct cfdata * -> cfdata_t
use __arraycount when appropriate
 1.13 28-Apr-2008  martin branches: 1.13.22; 1.13.32;
Remove clause 3 and 4 from TNF licenses
 1.12 04-Mar-2006  uwe branches: 1.12.68; 1.12.70; 1.12.72;
s/u_intN_t/uintN_t/
 1.11 11-Dec-2005  christos branches: 1.11.4; 1.11.6;
merge ktrace-lwp.
 1.10 15-Jul-2003  lukem branches: 1.10.16;
__KERNEL_RCSID()
 1.9 01-Jan-2003  thorpej branches: 1.9.2;
Use aprint_normal() for cfprint routines.
 1.8 21-Oct-2002  uch make this compile again.
 1.7 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.6 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.3 28-Mar-2002  uch branches: 1.3.6;
rework HD64461, HD64465 interrupt handling.
 1.2 24-Mar-2002  uch adapted to new interrupt code and shb changes.
 1.1 11-Feb-2002  uch branches: 1.1.2; 1.1.8;
HD64465 interrupt, uart, pcmcia modules
 1.1.8.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.8.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 11-Feb-2002  jdolecek file hd64465.c was added on branch kqueue on 2002-03-16 15:58:06 +0000
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.6.4 03-Jan-2003  thorpej Sync with HEAD.
 1.3.6.3 11-Nov-2002  nathanw Catch up to -current
 1.3.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.6.1 28-Mar-2002  nathanw file hd64465.c was added on branch nathanw_sa on 2002-10-18 02:37:24 +0000
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.10.16.1 21-Jun-2006  yamt sync with head.
 1.11.6.1 22-Apr-2006  simonb Sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.12.72.1 16-May-2008  yamt sync with head.
 1.12.70.1 18-May-2008  yamt sync with head.
 1.12.68.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.32.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.13.22.1 12-Jun-2011  rmind sync with head
 1.15.6.1 18-Feb-2012  mrg merge to -current.
 1.15.2.2 30-Oct-2012  yamt sync with head
 1.15.2.1 17-Apr-2012  yamt sync with head
 1.16.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.17.52.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.18.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 11-Feb-2002  uch branches: 1.1.2; 1.1.8; 1.1.16; 1.1.124; 1.1.126; 1.1.128;
HD64465 interrupt, uart, pcmcia modules
 1.1.128.1 16-May-2008  yamt sync with head.
 1.1.126.1 18-May-2008  yamt sync with head.
 1.1.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.16.2 11-Feb-2002  uch HD64465 interrupt, uart, pcmcia modules
 1.1.16.1 11-Feb-2002  uch file hd64465intcreg.h was added on branch nathanw_sa on 2002-02-11 17:27:16 +0000
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 11-Feb-2002  jdolecek file hd64465intcreg.h was added on branch kqueue on 2002-03-16 15:58:06 +0000
 1.1.2.1 28-Feb-2002  nathanw Catch up to -current.
 1.38 06-Aug-2025  andvar s/attibute/attribute/ and s/previosly/previously/ in comments.
 1.37 02-Jun-2024  andvar fix various typos in word `interrupt', mainly in comments.
 1.36 05-Apr-2023  andvar remove some double ee typos in comments.
 1.35 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.34 24-Apr-2021  thorpej branches: 1.34.8;
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.33 21-Nov-2020  thorpej branches: 1.33.2;
malloc(9) -> kmem(9)
 1.32 29-Oct-2012  chs branches: 1.32.50;
and finally, initialize sc_dev now that I added it back.
 1.31 29-Oct-2012  chs third try is the charm: really make this build again.
 1.30 29-Oct-2012  chs fix device/softc split errors.
 1.29 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.28 26-Jul-2011  dyoung branches: 1.28.2; 1.28.12;
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.
 1.27 19-Jul-2011  dyoung Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark hpcsh/bus.h obsolete.
 1.26 07-Nov-2009  cegger Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
 1.25 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.24 15-Dec-2007  perry branches: 1.24.6; 1.24.8; 1.24.10;
__FUNCTION__ -> __func__
 1.23 17-Oct-2007  garbled branches: 1.23.4; 1.23.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.22 17-Jul-2007  he branches: 1.22.10;
Adapt to the new signature of kthread_create(), and the removal
of kthread_create1().
 1.21 04-Mar-2006  uwe branches: 1.21.24; 1.21.32;
s/u_intN_t/uintN_t/
 1.20 11-Dec-2005  christos branches: 1.20.4; 1.20.6;
merge ktrace-lwp.
 1.19 26-Aug-2005  drochner s/locdesc_t/int/g
 1.18 28-Jun-2005  drochner branches: 1.18.2;
convert remaining autoconf bus "submatch" functions to use the new
signature (passing locators), and remove some which obviously don't
serve any purpose
(untested, sorry)
 1.17 01-Apr-2005  yamt merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.16 11-Aug-2004  mycroft branches: 1.16.4; 1.16.6;
Forget to reset to memory mode on power up.
The hd64465 looks a bit incomplete, but "not my problem".
 1.15 11-Aug-2004  mycroft Attempt to fix these up, but I have no way to test them.
 1.14 03-Nov-2003  jdolecek vaddr_t is not a pointer
 1.13 15-Jul-2003  lukem __KERNEL_RCSID()
 1.12 01-Apr-2003  thorpej branches: 1.12.2;
Use PAGE_SIZE rather than NBPG.
 1.11 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.10 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.9 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.6 01-Jun-2002  lukem branches: 1.6.2;
SIMPLEQ rototill:
- 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
 1.5 09-May-2002  uch branches: 1.5.2;
adapt to new pmap code.
 1.4 28-Mar-2002  uch rework HD64461, HD64465 interrupt handling.
 1.3 28-Feb-2002  uch branches: 1.3.2; 1.3.8;
Cleanup register definition
 1.2 17-Feb-2002  uch SH3/SH4 common kernel support.
 1.1 11-Feb-2002  uch HD64465 interrupt, uart, pcmcia modules
 1.3.8.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.3.8.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.3.8.1 28-Feb-2002  jdolecek file hd64465pcmcia.c was added on branch kqueue on 2002-03-16 15:58:07 +0000
 1.3.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.3.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.2.1 28-Feb-2002  nathanw Catch up to -current.
 1.5.2.1 14-Jul-2002  gehenna catch up with -current.
 1.6.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.6.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.6.2.1 01-Jun-2002  nathanw file hd64465pcmcia.c was added on branch nathanw_sa on 2002-10-18 02:37:24 +0000
 1.12.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.12.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.12.2.2 12-Aug-2004  skrll Sync with HEAD.
 1.12.2.1 03-Aug-2004  skrll Sync with HEAD
 1.16.6.2 13-Feb-2005  yamt fix a typo in the previous. (bogus argument to uvm_km_free)
 1.16.6.1 13-Feb-2005  yamt use new apis.
 1.16.4.1 29-Apr-2005  kent sync with -current
 1.18.2.3 21-Jan-2008  yamt sync with head
 1.18.2.2 03-Sep-2007  yamt sync with head.
 1.18.2.1 21-Jun-2006  yamt sync with head.
 1.20.6.1 22-Apr-2006  simonb Sync with head.
 1.20.4.1 09-Sep-2006  rpaulo sync with head
 1.21.32.1 03-Oct-2007  garbled Sync with HEAD
 1.21.24.1 20-Aug-2007  ad Sync with HEAD.
 1.22.10.2 09-Jan-2008  matt sync with HEAD
 1.22.10.1 06-Nov-2007  matt sync with HEAD
 1.23.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.23.4.1 26-Dec-2007  ad Sync with head.
 1.24.10.2 11-Mar-2010  yamt sync with head
 1.24.10.1 16-May-2008  yamt sync with head.
 1.24.8.1 18-May-2008  yamt sync with head.
 1.24.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.28.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.28.2.1 30-Oct-2012  yamt sync with head
 1.32.50.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.33.2.2 22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.33.2.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.34.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 27-Dec-2021  andvar fix few typos in comments.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 11-Feb-2002  uch branches: 1.1.2; 1.1.8; 1.1.16; 1.1.124; 1.1.126; 1.1.128;
HD64465 interrupt, uart, pcmcia modules
 1.1.128.1 16-May-2008  yamt sync with head.
 1.1.126.1 18-May-2008  yamt sync with head.
 1.1.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.16.2 11-Feb-2002  uch HD64465 interrupt, uart, pcmcia modules
 1.1.16.1 11-Feb-2002  uch file hd64465reg.h was added on branch nathanw_sa on 2002-02-11 17:27:17 +0000
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 11-Feb-2002  jdolecek file hd64465reg.h was added on branch kqueue on 2002-03-16 15:58:07 +0000
 1.1.2.1 28-Feb-2002  nathanw Catch up to -current.
 1.21 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.20 08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.19 12-Feb-2012  matt branches: 1.19.46; 1.19.48;
Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.18 19-Jul-2011  dyoung branches: 1.18.2; 1.18.6;
Change <machine/bus.h> to <sys/bus.h> throughout.

Split bus.h -> bus_{defs,funcs}.h.

Mark hpcsh/bus.h obsolete.
 1.17 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.16 14-Mar-2008  cube branches: 1.16.2; 1.16.4;
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.15 15-Dec-2007  perry branches: 1.15.2; 1.15.6;
__FUNCTION__ -> __func__
 1.14 13-Jul-2006  gdamore branches: 1.14.34; 1.14.44; 1.14.48;
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.13 04-Mar-2006  uwe branches: 1.13.2; 1.13.10;
s/u_intN_t/uintN_t/
 1.12 24-Dec-2005  perry branches: 1.12.4; 1.12.6;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.11 11-Dec-2005  christos merge ktrace-lwp.
 1.10 15-Jul-2003  lukem branches: 1.10.16;
__KERNEL_RCSID()
 1.9 14-Jun-2003  thorpej branches: 1.9.2;
Also pass a type argument to comcnattach() and com_kgdb_attach().
comspeed() (and thus cominit()) may need this information.
 1.8 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL
 1.7 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.4 28-Mar-2002  uch branches: 1.4.2; 1.4.6;
rework HD64461, HD64465 interrupt handling.
 1.3 03-Mar-2002  uch branches: 1.3.4;
don't initialize twice
 1.2 02-Mar-2002  uch Initial support for KGDB on the sh3.
 1.1 11-Feb-2002  uch branches: 1.1.2;
HD64465 interrupt, uart, pcmcia modules
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.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.3.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.4.2 16-Mar-2002  jdolecek Catch up with -current.
 1.3.4.1 03-Mar-2002  jdolecek file hd64465uart.c was added on branch kqueue on 2002-03-16 15:58:07 +0000
 1.4.6.3 18-Oct-2002  nathanw Catch up to -current.
 1.4.6.2 17-Sep-2002  nathanw Catch up to -current.
 1.4.6.1 28-Mar-2002  nathanw file hd64465uart.c was added on branch nathanw_sa on 2002-09-17 21:14:53 +0000
 1.4.2.2 06-Jun-2002  gehenna remove cdev_decl.
 1.4.2.1 19-May-2002  gehenna Replace the access to devsw table and the hard-coded majors with devsw API.
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.10.16.4 17-Mar-2008  yamt sync with head.
 1.10.16.3 21-Jan-2008  yamt sync with head
 1.10.16.2 30-Dec-2006  yamt sync with head.
 1.10.16.1 21-Jun-2006  yamt sync with head.
 1.12.6.1 22-Apr-2006  simonb Sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.13.10.1 16-Jun-2006  gdamore Conver hpcsh com attachments to new com(4) framework.
 1.13.2.1 11-Aug-2006  yamt sync with head
 1.14.48.1 02-Jan-2008  bouyer Sync with HEAD
 1.14.44.1 26-Dec-2007  ad Sync with head.
 1.14.34.2 23-Mar-2008  matt sync with HEAD
 1.14.34.1 09-Jan-2008  matt sync with HEAD
 1.15.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.15.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.15.2.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.18.6.1 18-Feb-2012  mrg merge to -current.
 1.18.2.1 17-Apr-2012  yamt sync with head
 1.19.48.1 10-Jun-2019  christos Sync with HEAD
 1.19.46.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 04-Feb-2002  uch branches: 1.1.2; 1.1.4; 1.1.16; 1.1.124; 1.1.126; 1.1.128;
HITACHI HD64465 UART module register define.
 1.1.128.1 16-May-2008  yamt sync with head.
 1.1.126.1 18-May-2008  yamt sync with head.
 1.1.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.16.2 04-Feb-2002  uch HITACHI HD64465 UART module register define.
 1.1.16.1 04-Feb-2002  uch file hd64465uartreg.h was added on branch nathanw_sa on 2002-02-04 17:23:45 +0000
 1.1.4.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.1 04-Feb-2002  jdolecek file hd64465uartreg.h was added on branch kqueue on 2002-02-11 20:08:17 +0000
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 02-Mar-2002  uch branches: 1.2.4; 1.2.12; 1.2.120; 1.2.122; 1.2.124;
Initial support for KGDB on the sh3.
 1.1 11-Feb-2002  uch branches: 1.1.2;
HD64465 interrupt, uart, pcmcia modules
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.124.1 16-May-2008  yamt sync with head.
 1.2.122.1 18-May-2008  yamt sync with head.
 1.2.120.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.12.2 02-Mar-2002  uch Initial support for KGDB on the sh3.
 1.2.12.1 02-Mar-2002  uch file hd64465uartvar.h was added on branch nathanw_sa on 2002-03-02 22:26:27 +0000
 1.2.4.2 16-Mar-2002  jdolecek Catch up with -current.
 1.2.4.1 02-Mar-2002  jdolecek file hd64465uartvar.h was added on branch kqueue on 2002-03-16 15:58:07 +0000
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 04-Mar-2006  uwe branches: 1.3.68; 1.3.70; 1.3.72;
s/u_intN_t/uintN_t/
 1.2 28-Mar-2002  uch branches: 1.2.6; 1.2.28; 1.2.42; 1.2.44;
rework HD64461, HD64465 interrupt handling.
 1.1 11-Feb-2002  uch branches: 1.1.2; 1.1.8;
HD64465 interrupt, uart, pcmcia modules
 1.1.8.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 11-Feb-2002  jdolecek file hd64465var.h was added on branch kqueue on 2002-03-16 15:58:07 +0000
 1.1.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.44.1 22-Apr-2006  simonb Sync with head.
 1.2.42.1 09-Sep-2006  rpaulo sync with head
 1.2.28.1 21-Jun-2006  yamt sync with head.
 1.2.6.2 28-Mar-2002  uch rework HD64461, HD64465 interrupt handling.
 1.2.6.1 28-Mar-2002  uch file hd64465var.h was added on branch nathanw_sa on 2002-03-28 15:27:03 +0000
 1.3.72.1 16-May-2008  yamt sync with head.
 1.3.70.1 18-May-2008  yamt sync with head.
 1.3.68.1 02-Jun-2008  mjf Sync with HEAD.
 1.7 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.6 22-Jul-2006  uwe branches: 1.6.58; 1.6.60; 1.6.62;
Shave off one instruction in hd6446x_intr_raise.
 1.5 22-Jan-2006  uwe branches: 1.5.2; 1.5.6;
Provide .size
 1.4 22-Jan-2006  uwe LINTSTUBs.
 1.3 18-Dec-2005  uwe branches: 1.3.2;
Drop unnecessary include. Add few blank lines for better readability.
 1.2 09-May-2002  uch branches: 1.2.6; 1.2.8; 1.2.30;
cosmetic changes
 1.1 28-Mar-2002  uch rework HD64461, HD64465 interrupt handling.
 1.2.30.2 30-Dec-2006  yamt sync with head.
 1.2.30.1 21-Jun-2006  yamt sync with head.
 1.2.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.8.1 09-May-2002  jdolecek file hd6446x_subr.S was added on branch kqueue on 2002-06-23 17:37:01 +0000
 1.2.6.2 09-May-2002  uch cosmetic changes
 1.2.6.1 09-May-2002  uch file hd6446x_subr.S was added on branch nathanw_sa on 2002-05-09 12:41:10 +0000
 1.3.2.1 01-Feb-2006  yamt sync with head.
 1.5.6.1 11-Aug-2006  yamt sync with head
 1.5.2.1 09-Sep-2006  rpaulo sync with head
 1.6.62.1 16-May-2008  yamt sync with head.
 1.6.60.1 18-May-2008  yamt sync with head.
 1.6.58.1 02-Jun-2008  mjf Sync with HEAD.
 1.8 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.7 22-Jul-2006  uwe branches: 1.7.58; 1.7.60; 1.7.62;
Using "irq" in different functions to either x or 1<<x is confusing.
Rename.
 1.6 22-Jul-2006  uwe We don't need to update HD6446X_NIMR when (dis)establishing an
interrupt as splx will update it from the recomputed mask anyway.
 1.5 22-Jul-2006  uwe hd6446x_intr_priority_update: simplify.
 1.4 18-Dec-2005  uwe branches: 1.4.4; 1.4.8;
Use ANSI uintN_t types. Functions w/out arguments should have "void"
in their definitions. Declare local function static.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 15-Jul-2003  lukem branches: 1.2.16;
__KERNEL_RCSID()
 1.1 28-Mar-2002  uch branches: 1.1.6; 1.1.8; 1.1.14;
rework HD64461, HD64465 interrupt handling.
 1.1.14.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.14.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.14.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 28-Mar-2002  jdolecek file hd6446xintc.c was added on branch kqueue on 2002-06-23 17:37:01 +0000
 1.1.6.2 28-Mar-2002  uch rework HD64461, HD64465 interrupt handling.
 1.1.6.1 28-Mar-2002  uch file hd6446xintc.c was added on branch nathanw_sa on 2002-03-28 15:27:05 +0000
 1.2.16.2 30-Dec-2006  yamt sync with head.
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.4.8.1 11-Aug-2006  yamt sync with head
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.7.62.1 16-May-2008  yamt sync with head.
 1.7.60.1 18-May-2008  yamt sync with head.
 1.7.58.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 18-Dec-2005  uwe branches: 1.2.74; 1.2.76; 1.2.78;
Multiple-inclusion protection.
 1.1 28-Mar-2002  uch branches: 1.1.6; 1.1.8; 1.1.30;
rework HD64461, HD64465 interrupt handling.
 1.1.30.1 21-Jun-2006  yamt sync with head.
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 28-Mar-2002  jdolecek file hd6446xintcreg.h was added on branch kqueue on 2002-06-23 17:37:01 +0000
 1.1.6.2 28-Mar-2002  uch rework HD64461, HD64465 interrupt handling.
 1.1.6.1 28-Mar-2002  uch file hd6446xintcreg.h was added on branch nathanw_sa on 2002-03-28 15:27:05 +0000
 1.2.78.1 16-May-2008  yamt sync with head.
 1.2.76.1 18-May-2008  yamt sync with head.
 1.2.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 18-Dec-2005  uwe branches: 1.2.74; 1.2.76; 1.2.78;
Use ANSI unitN_t types. Add 'extern' to extern function declarations.
Shuffle declaration order to make it more clear that raise/resume come
from a different file.
 1.1 28-Mar-2002  uch branches: 1.1.6; 1.1.8; 1.1.30;
rework HD64461, HD64465 interrupt handling.
 1.1.30.1 21-Jun-2006  yamt sync with head.
 1.1.8.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.1 28-Mar-2002  jdolecek file hd6446xintcvar.h was added on branch kqueue on 2002-06-23 17:37:01 +0000
 1.1.6.2 28-Mar-2002  uch rework HD64461, HD64465 interrupt handling.
 1.1.6.1 28-Mar-2002  uch file hd6446xintcvar.h was added on branch nathanw_sa on 2002-03-28 15:27:05 +0000
 1.2.78.1 16-May-2008  yamt sync with head.
 1.2.76.1 18-May-2008  yamt sync with head.
 1.2.74.1 02-Jun-2008  mjf Sync with HEAD.

RSS XML Feed