Home | History | Annotate | only in /src/sys/arch/powerpc/ibm4xx/dev
History log of /src/sys/arch/powerpc/ibm4xx/dev
RevisionDateAuthorComments
 1.5 12-Aug-2002  simonb Reorganise the IBM 4xx bus layout, using terminology from the IBM
documentation:
- Remove "mainbus" altogether.
- The new root is "plb" - the Processor Local Bus.
- Attached to this is the "opb" - the On-chip Peripheral Bus, to which
all the on-chip devices are attached (except the cpu and pci host
bridge).
- Port-specific code can pass an array of 'struct plb_dev' to
config_rootfound() to attach extra devices to the plb. The walnut
port attaches a "pbus" (Peripheral Bus) in here for the RTC and
pc keyboard controller to attach to.
There is still much 405GP specific code; the next round of changes will
generalise this to enable easier support for other 4xx CPUs.
 1.4 13-Mar-2002  eeh branches: 1.4.4;
Adapt to the new, separate mainbus.
 1.3 08-Mar-2002  simonb Include libkern.h for strcmp() prototype.
 1.2 29-Oct-2001  simonb branches: 1.2.2;
Don't return at the end of a void function.
 1.1 24-Jun-2001  simonb branches: 1.1.2; 1.1.6;
Move on-chip 405GP devices to powerpc/ibm4xx/dev.
 1.1.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.2.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.3 13-Aug-2002  nathanw Catch up to -current.
 1.2.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.2.1 29-Oct-2001  nathanw file com_mainbus.c was added on branch nathanw_sa on 2002-04-01 07:42:03 +0000
 1.4.4.1 31-Aug-2002  gehenna catch up with -current.
 1.25 27-Feb-2021  rin Switch to intr_establish_xname().
 1.24 06-Jul-2020  rin branches: 1.24.2;
Style and cosmetic changes. No binary changes intended.
 1.23 15-Dec-2019  rin Belatedly catch up with MI com(4) change in com.c rev. 1.351:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/com.c#rev1.351

XXX
pullup to netbsd-9
 1.22 08-Dec-2018  thorpej branches: 1.22.4;
Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.21 18-Jun-2011  matt branches: 1.21.52; 1.21.54;
Use <sys/foo.h> instead of <machine/foo.h> if such a file exists.
Don't assume <sys/cpu.h> includes <powerpc/subarch/cpu*.h>. Include it
explicitly.
 1.20 14-Mar-2008  cube branches: 1.20.36;
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.19 22-Feb-2007  thorpej branches: 1.19.22; 1.19.38; 1.19.42;
TRUE -> true, FALSE -> false
 1.18 13-Jul-2006  gdamore branches: 1.18.10;
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.17 10-Jul-2006  thorpej Put appropriate prefixes on property names to reduce chances of name
collisions.
 1.16 07-May-2006  simonb branches: 1.16.4;
Unwrap not-too-long long.
 1.15 05-May-2006  thorpej Remove the devprop API and switch everthing over to the new proplib. Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.
 1.14 18-Feb-2006  thorpej branches: 1.14.2; 1.14.4; 1.14.6;
- Don't expose dev_propdb directly -- provide devprop_*() wrappers instead.
- Rework the ARMADILLO / epe device properties interaction so that it actually
associates the MAC address property with the epe device instance.
 1.13 11-Dec-2005  christos branches: 1.13.2; 1.13.4; 1.13.6;
merge ktrace-lwp.
 1.12 24-Dec-2004  shige branches: 1.12.10;
Add functions:
- com_opb_cnattach
- com_opb_device_register
 1.11 15-Jul-2003  lukem branches: 1.11.6;
__KERNEL_RCSID()
 1.10 14-Jul-2003  simonb Check return value of prop_get() correctly; serial ports now attach on
a walnut, but don't seem to accept input(?!).
 1.9 04-Jul-2003  thorpej Consult the "frequency" property associated with the device in the
dev_propdb, rather than using "board_info".
 1.8 02-Oct-2002  thorpej branches: 1.8.6;
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 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.4 23-Aug-2002  scw branches: 1.4.2; 1.4.4;
Don't assume all com ports run at "COM_FREQ", or a multiple thereof.
Use a board-specific property instead.
 1.3 14-Aug-2002  simonb Remove the "comfound < 2" bogosity.
 1.2 14-Aug-2002  simonb Remove an unused global variable (that was marked with an XXX!).
 1.1 12-Aug-2002  simonb branches: 1.1.2;
Reorganise the IBM 4xx bus layout, using terminology from the IBM
documentation:
- Remove "mainbus" altogether.
- The new root is "plb" - the Processor Local Bus.
- Attached to this is the "opb" - the On-chip Peripheral Bus, to which
all the on-chip devices are attached (except the cpu and pci host
bridge).
- Port-specific code can pass an array of 'struct plb_dev' to
config_rootfound() to attach extra devices to the plb. The walnut
port attaches a "pbus" (Peripheral Bus) in here for the RTC and
pc keyboard controller to attach to.
There is still much 405GP specific code; the next round of changes will
generalise this to enable easier support for other 4xx CPUs.
 1.1.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.3 27-Aug-2002  nathanw Catch up to -current.
 1.1.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 12-Aug-2002  nathanw file com_opb.c was added on branch nathanw_sa on 2002-08-13 02:18:43 +0000
 1.4.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.4.1 23-Aug-2002  jdolecek file com_opb.c was added on branch kqueue on 2002-09-06 08:39:06 +0000
 1.4.2.2 31-Aug-2002  gehenna catch up with -current.
 1.4.2.1 23-Aug-2002  gehenna file com_opb.c was added on branch gehenna-devsw on 2002-08-31 13:45:43 +0000
 1.8.6.4 17-Jan-2005  skrll Sync with HEAD.
 1.8.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.6.1 03-Aug-2004  skrll Sync with HEAD
 1.11.6.1 15-Sep-2005  riz Pull up following revision(s) (requested by shige in ticket #5820):
distrib/evbppc/md-kernel/Makefile 1.3 via patch
etc/etc.evbppc/Makefile.inc 1.3 via patch
sys/arch/evbppc/conf/files.obs405 1.5-1.8 via patch
sys/arch/evbppc/conf/OPENBLOCKS266 1.22,1.25 via patch
sys/arch/evbppc/include/obs266.h 1.1 (new)
sys/arch/evbppc/include/obs405.h 1.1-1.5 (new)
sys/arch/evbppc/include/rbus_machdep.h 1.1 (new)
sys/arch/evbppc/obs405/consinit.c 1.2-1.4
sys/arch/evbppc/obs405/dev/x1226.c deleted
sys/arch/evbppc/obs405/dev/x1226reg.h deleted
sys/arch/evbppc/obs405/machdep.c deleted
sys/arch/evbppc/obs405/obs266_autoconf.c 1.1 (new)
sys/arch/evbppc/obs405/obs266_machdep.c 1.1 (new, plus patch)
sys/arch/evbppc/obs405/obs405_autoconf.c 1.1 (new, plus patch)
sys/arch/evbppc/obs405/obs405_machdep.c 1.1 (new)
sys/arch/evbppc/obs405/rbus_machdep.c 1.1 (new)
sys/arch/powerpc/conf/files.ibm4xx 1.6-1.7
sys/arch/powerpc/ibm4xx/board_prop.c 1.1 (new)
sys/arch/powerpc/ibm4xx/dev/com_opb.c 1.12
sys/arch/powerpc/ibm4xx/dev/comopbvar.h 1.1 (new)
sys/arch/powerpc/ibm4xx/ibm40x_machdep.c 1.3-1.4
sys/arch/powerpc/ibm4xx/ibm4xx_autoconf.c 1.1-1.2 (new)
sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c 1.1-1.3 (new)
sys/arch/powerpc/ibm4xx/ibm4xxgpx_autoconf.c 1.2-1.3
sys/arch/powerpc/ibm4xx/openbios/openbios.c 1.1 (new)
sys/arch/powerpc/include/ibm4xx/cpu.h 1.7-1.10
sys/arch/powerpc/include/ibm4xx/openbios.h 1.1 (new)

Update OpenBlockS266 support to more modern, stable sources.
 1.12.10.4 17-Mar-2008  yamt sync with head.
 1.12.10.3 26-Feb-2007  yamt sync with head.
 1.12.10.2 30-Dec-2006  yamt sync with head.
 1.12.10.1 21-Jun-2006  yamt sync with head.
 1.13.6.2 01-Jun-2006  kardel Sync with head.
 1.13.6.1 22-Apr-2006  simonb Sync with head.
 1.13.4.1 09-Sep-2006  rpaulo sync with head
 1.13.2.1 18-Feb-2006  yamt sync with head.
 1.14.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.14.4.1 11-May-2006  elad sync with head
 1.14.2.2 11-Aug-2006  yamt sync with head
 1.14.2.1 24-May-2006  yamt sync with head.
 1.16.4.4 13-Jul-2006  gdamore Merge from HEAD.
 1.16.4.3 16-Jun-2006  gdamore Adapt to KNF changes per simonb.
 1.16.4.2 16-Jun-2006  simonb Fix order of arguments to COM_INIT_REGS macro. Fixes console problems
on a Walnut.
 1.16.4.1 15-Jun-2006  gdamore Initial work for PowerPC-specific com(4) rewhack. Compile tested, but I
lack hardware to test. If someone wants to validate, would be appreciated.
(Compile tested for WALNUT, EXPLORA451, and EV64260 kernels.)
 1.18.10.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.19.42.1 03-Apr-2008  mjf Sync with HEAD.
 1.19.38.1 24-Mar-2008  keiichi sync with head.
 1.19.22.1 23-Mar-2008  matt sync with HEAD
 1.20.36.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.21.54.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.21.54.1 10-Jun-2019  christos Sync with HEAD
 1.21.52.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.22.4.1 25-Feb-2020  martin Pull up following revision(s) (requested by rin in ticket #728):

sys/arch/powerpc/ibm4xx/dev/com_opb.c: revision 1.23

Belatedly catch up with MI com(4) change in com.c rev. 1.351:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/com.c#rev1.351

XXX
pullup to netbsd-9
 1.24.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.3 17-Jun-2011  matt struct device * -> device_t
struct cfdata * -> cfdata_t
split device/softc (CFATTACH_DECL_NEW)
use device_accessors and device_private
constify
 1.2 11-Dec-2005  christos branches: 1.2.110;
merge ktrace-lwp.
 1.1 24-Dec-2004  shige branches: 1.1.4; 1.1.14;
Add functions:
- com_opb_cnattach
- com_opb_device_register
 1.1.14.2 15-Sep-2005  riz Pull up following revision(s) (requested by shige in ticket #5820):
distrib/evbppc/md-kernel/Makefile 1.3 via patch
etc/etc.evbppc/Makefile.inc 1.3 via patch
sys/arch/evbppc/conf/files.obs405 1.5-1.8 via patch
sys/arch/evbppc/conf/OPENBLOCKS266 1.22,1.25 via patch
sys/arch/evbppc/include/obs266.h 1.1 (new)
sys/arch/evbppc/include/obs405.h 1.1-1.5 (new)
sys/arch/evbppc/include/rbus_machdep.h 1.1 (new)
sys/arch/evbppc/obs405/consinit.c 1.2-1.4
sys/arch/evbppc/obs405/dev/x1226.c deleted
sys/arch/evbppc/obs405/dev/x1226reg.h deleted
sys/arch/evbppc/obs405/machdep.c deleted
sys/arch/evbppc/obs405/obs266_autoconf.c 1.1 (new)
sys/arch/evbppc/obs405/obs266_machdep.c 1.1 (new, plus patch)
sys/arch/evbppc/obs405/obs405_autoconf.c 1.1 (new, plus patch)
sys/arch/evbppc/obs405/obs405_machdep.c 1.1 (new)
sys/arch/evbppc/obs405/rbus_machdep.c 1.1 (new)
sys/arch/powerpc/conf/files.ibm4xx 1.6-1.7
sys/arch/powerpc/ibm4xx/board_prop.c 1.1 (new)
sys/arch/powerpc/ibm4xx/dev/com_opb.c 1.12
sys/arch/powerpc/ibm4xx/dev/comopbvar.h 1.1 (new)
sys/arch/powerpc/ibm4xx/ibm40x_machdep.c 1.3-1.4
sys/arch/powerpc/ibm4xx/ibm4xx_autoconf.c 1.1-1.2 (new)
sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c 1.1-1.3 (new)
sys/arch/powerpc/ibm4xx/ibm4xxgpx_autoconf.c 1.2-1.3
sys/arch/powerpc/ibm4xx/openbios/openbios.c 1.1 (new)
sys/arch/powerpc/include/ibm4xx/cpu.h 1.7-1.10
sys/arch/powerpc/include/ibm4xx/openbios.h 1.1 (new)

Update OpenBlockS266 support to more modern, stable sources.
 1.1.14.1 24-Dec-2004  riz file comopbvar.h was added on branch netbsd-2 on 2005-09-15 14:28:44 +0000
 1.1.4.2 17-Jan-2005  skrll Sync with HEAD.
 1.1.4.1 24-Dec-2004  skrll file comopbvar.h was added on branch ktrace-lwp on 2005-01-17 19:30:09 +0000
 1.2.110.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.8 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.7 24-Apr-2021  thorpej branches: 1.7.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.6 27-Feb-2021  rin branches: 1.6.2;
Switch to intr_establish_xname().
 1.5 23-Apr-2016  skrll branches: 1.5.30;
Merge nick-nhusb

- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix
 1.4 30-Jul-2015  skrll Use IPL_VM for dwc2_intr and mark as MP safe where possible.
 1.3 02-Sep-2014  skrll branches: 1.3.2;
Use IPL_SCHED for dwctwo(4) - no need for the KERNEL_LOCK.
 1.2 21-Nov-2013  kiyohara branches: 1.2.4; 1.2.6; 1.2.8; 1.2.10; 1.2.14;
Move the parameters for obs600 to obs600_autoconf.c. This parameters was set from u-boot.
 1.1 21-Nov-2013  kiyohara Support Synopsys DesigneWave OTG on PowerPC 405EX.
 1.2.14.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.2.10.3 03-Dec-2017  jdolecek update from HEAD
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 21-Nov-2013  tls file dwctwo_plb.c was added on branch tls-maxphys on 2014-08-20 00:03:19 +0000
 1.2.8.1 05-Apr-2017  snj Pull up following revision(s) (requested by skrll in ticket #1395):
share/man/man4/axe.4: netbsd-7-nhusb
share/man/man4/axen.4: netbsd-7-nhusb
share/man/man4/cdce.4: netbsd-7-nhusb
share/man/man4/uaudio.4: netbsd-7-nhusb
share/man/man4/ucom.4: netbsd-7-nhusb
share/man/man4/uep.4: netbsd-7-nhusb
share/man/man4/urtw.4: netbsd-7-nhusb
share/man/man4/usb.4: netbsd-7-nhusb
share/man/man4/uyap.4: netbsd-7-nhusb
share/man/man4/xhci.4: netbsd-7-nhusb
share/man/man9/usbdi.9: netbsd-7-nhusb
sys/arch/amd64/conf/ALL: netbsd-7-nhusb
sys/arch/amd64/conf/GENERIC: netbsd-7-nhusb
sys/arch/amiga/dev/slhci_zbus.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_otg.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_usb.c: netbsd-7-nhusb
sys/arch/arm/amlogic/amlogic_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/at91/at91ohci.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm2835_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm53xx_usb.c: netbsd-7-nhusb
sys/arch/arm/ep93xx/epohci.c: netbsd-7-nhusb
sys/arch/arm/gemini/obio_ehci.c: netbsd-7-nhusb
sys/arch/arm/imx/files.imx23: netbsd-7-nhusb
sys/arch/arm/imx/imxusb.c: netbsd-7-nhusb
sys/arch/arm/imx/imxusbreg.h: netbsd-7-nhusb
sys/arch/arm/omap/obio_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/omap3_ehci.c: netbsd-7-nhusb
sys/arch/arm/omap/omapl1x_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/tiotg.c: netbsd-7-nhusb
sys/arch/arm/s3c2xx0/ohci_s3c24x0.c: netbsd-7-nhusb
sys/arch/arm/samsung/exynos_usb.c: netbsd-7-nhusb
sys/arch/arm/xscale/pxa2x0_ohci.c: netbsd-7-nhusb
sys/arch/arm/zynq/zynq_usb.c: netbsd-7-nhusb
sys/arch/hpcarm/dev/nbp_slhci.c: netbsd-7-nhusb
sys/arch/hpcmips/dev/plumohci.c: netbsd-7-nhusb
sys/arch/i386/conf/ALL: netbsd-7-nhusb
sys/arch/i386/conf/GENERIC: netbsd-7-nhusb
sys/arch/i386/pci/gcscehci.c: netbsd-7-nhusb
sys/arch/luna68k/conf/GENERIC: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahci.c: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahcivar.h: netbsd-7-nhusb
sys/arch/mips/alchemy/dev/ohci_aubus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ehci_arbus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ohci_arbus.c: netbsd-7-nhusb
sys/arch/mips/conf/files.adm5120: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ehci.c: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ohci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ehci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ohci.c: netbsd-7-nhusb
sys/arch/playstation2/dev/ohci_sbus.c: netbsd-7-nhusb
sys/arch/powerpc/booke/dev/pq3ehci.c: netbsd-7-nhusb
sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c: netbsd-7-nhusb
sys/arch/x68k/dev/slhci_intio.c: netbsd-7-nhusb
sys/conf/files: netbsd-7-nhusb
sys/dev/cardbus/ehci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/ohci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/uhci_cardbus.c: netbsd-7-nhusb
sys/dev/ic/sl811hs.c: netbsd-7-nhusb
sys/dev/ic/sl811hsvar.h: netbsd-7-nhusb
sys/dev/isa/slhci_isa.c: netbsd-7-nhusb
sys/dev/marvell/ehci_mv.c: netbsd-7-nhusb
sys/dev/pci/ehci_pci.c: netbsd-7-nhusb
sys/dev/pci/ohci_pci.c: netbsd-7-nhusb
sys/dev/pci/uhci_pci.c: netbsd-7-nhusb
sys/dev/pci/xhci_pci.c: netbsd-7-nhusb
sys/dev/pcmcia/slhci_pcmcia.c: netbsd-7-nhusb
sys/dev/usb/Makefile.usbdevs: netbsd-7-nhusb
sys/dev/usb/TODO: netbsd-7-nhusb
sys/dev/usb/TODO.usbmp: netbsd-7-nhusb
sys/dev/usb/aubtfwl.c: netbsd-7-nhusb
sys/dev/usb/auvitek.c: netbsd-7-nhusb
sys/dev/usb/auvitek_audio.c: netbsd-7-nhusb
sys/dev/usb/auvitek_dtv.c: netbsd-7-nhusb
sys/dev/usb/auvitek_i2c.c: netbsd-7-nhusb
sys/dev/usb/auvitek_video.c: netbsd-7-nhusb
sys/dev/usb/auvitekvar.h: netbsd-7-nhusb
sys/dev/usb/ehci.c: netbsd-7-nhusb
sys/dev/usb/ehcireg.h: netbsd-7-nhusb
sys/dev/usb/ehcivar.h: netbsd-7-nhusb
sys/dev/usb/emdtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_dtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_ir.c: netbsd-7-nhusb
sys/dev/usb/emdtvvar.h: netbsd-7-nhusb
sys/dev/usb/ezload.c: netbsd-7-nhusb
sys/dev/usb/ezload.h: netbsd-7-nhusb
sys/dev/usb/files.usb: netbsd-7-nhusb
sys/dev/usb/hid.c: netbsd-7-nhusb
sys/dev/usb/hid.h: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.c: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.h: netbsd-7-nhusb
sys/dev/usb/if_atu.c: netbsd-7-nhusb
sys/dev/usb/if_atureg.h: netbsd-7-nhusb
sys/dev/usb/if_aue.c: netbsd-7-nhusb
sys/dev/usb/if_auereg.h: netbsd-7-nhusb
sys/dev/usb/if_axe.c: netbsd-7-nhusb
sys/dev/usb/if_axen.c: netbsd-7-nhusb
sys/dev/usb/if_axenreg.h: netbsd-7-nhusb
sys/dev/usb/if_axereg.h: netbsd-7-nhusb
sys/dev/usb/if_cdce.c: netbsd-7-nhusb
sys/dev/usb/if_cdcereg.h: netbsd-7-nhusb
sys/dev/usb/if_cue.c: netbsd-7-nhusb
sys/dev/usb/if_cuereg.h: netbsd-7-nhusb
sys/dev/usb/if_kue.c: netbsd-7-nhusb
sys/dev/usb/if_kuereg.h: netbsd-7-nhusb
sys/dev/usb/if_otus.c: netbsd-7-nhusb
sys/dev/usb/if_otusvar.h: netbsd-7-nhusb
sys/dev/usb/if_rum.c: netbsd-7-nhusb
sys/dev/usb/if_rumreg.h: netbsd-7-nhusb
sys/dev/usb/if_rumvar.h: netbsd-7-nhusb
sys/dev/usb/if_run.c: netbsd-7-nhusb
sys/dev/usb/if_runvar.h: netbsd-7-nhusb
sys/dev/usb/if_smsc.c: netbsd-7-nhusb
sys/dev/usb/if_smscreg.h: netbsd-7-nhusb
sys/dev/usb/if_smscvar.h: netbsd-7-nhusb
sys/dev/usb/if_udav.c: netbsd-7-nhusb
sys/dev/usb/if_udavreg.h: netbsd-7-nhusb
sys/dev/usb/if_upgt.c: netbsd-7-nhusb
sys/dev/usb/if_upgtvar.h: netbsd-7-nhusb
sys/dev/usb/if_upl.c: netbsd-7-nhusb
sys/dev/usb/if_ural.c: netbsd-7-nhusb
sys/dev/usb/if_uralreg.h: netbsd-7-nhusb
sys/dev/usb/if_uralvar.h: netbsd-7-nhusb
sys/dev/usb/if_url.c: netbsd-7-nhusb
sys/dev/usb/if_urlreg.h: netbsd-7-nhusb
sys/dev/usb/if_urndis.c: netbsd-7-nhusb
sys/dev/usb/if_urndisreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtw.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn_data.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnvar.h: netbsd-7-nhusb
sys/dev/usb/if_urtwreg.h: netbsd-7-nhusb
sys/dev/usb/if_zyd.c: netbsd-7-nhusb
sys/dev/usb/if_zydreg.h: netbsd-7-nhusb
sys/dev/usb/irmce.c: netbsd-7-nhusb
sys/dev/usb/moscom.c: netbsd-7-nhusb
sys/dev/usb/motg.c: netbsd-7-nhusb
sys/dev/usb/motgvar.h: netbsd-7-nhusb
sys/dev/usb/ohci.c: netbsd-7-nhusb
sys/dev/usb/ohcireg.h: netbsd-7-nhusb
sys/dev/usb/ohcivar.h: netbsd-7-nhusb
sys/dev/usb/pseye.c: netbsd-7-nhusb
sys/dev/usb/slurm.c: netbsd-7-nhusb
sys/dev/usb/stuirda.c: netbsd-7-nhusb
sys/dev/usb/u3g.c: netbsd-7-nhusb
sys/dev/usb/uark.c: netbsd-7-nhusb
sys/dev/usb/uatp.c: netbsd-7-nhusb
sys/dev/usb/uaudio.c: netbsd-7-nhusb
sys/dev/usb/uberry.c: netbsd-7-nhusb
sys/dev/usb/ubsa.c: netbsd-7-nhusb
sys/dev/usb/ubsa_common.c: netbsd-7-nhusb
sys/dev/usb/ubsavar.h: netbsd-7-nhusb
sys/dev/usb/ubt.c: netbsd-7-nhusb
sys/dev/usb/uchcom.c: netbsd-7-nhusb
sys/dev/usb/ucom.c: netbsd-7-nhusb
sys/dev/usb/ucomvar.h: netbsd-7-nhusb
sys/dev/usb/ucycom.c: netbsd-7-nhusb
sys/dev/usb/udl.c: netbsd-7-nhusb
sys/dev/usb/udl.h: netbsd-7-nhusb
sys/dev/usb/udsbr.c: netbsd-7-nhusb
sys/dev/usb/udsir.c: netbsd-7-nhusb
sys/dev/usb/uep.c: netbsd-7-nhusb
sys/dev/usb/uftdi.c: netbsd-7-nhusb
sys/dev/usb/uftdireg.h: netbsd-7-nhusb
sys/dev/usb/ugen.c: netbsd-7-nhusb
sys/dev/usb/ugensa.c: netbsd-7-nhusb
sys/dev/usb/uhci.c: netbsd-7-nhusb
sys/dev/usb/uhcireg.h: netbsd-7-nhusb
sys/dev/usb/uhcivar.h: netbsd-7-nhusb
sys/dev/usb/uhid.c: netbsd-7-nhusb
sys/dev/usb/uhidev.c: netbsd-7-nhusb
sys/dev/usb/uhidev.h: netbsd-7-nhusb
sys/dev/usb/uhmodem.c: netbsd-7-nhusb
sys/dev/usb/uhso.c: netbsd-7-nhusb
sys/dev/usb/uhub.c: netbsd-7-nhusb
sys/dev/usb/uipad.c: netbsd-7-nhusb
sys/dev/usb/uipaq.c: netbsd-7-nhusb
sys/dev/usb/uirda.c: netbsd-7-nhusb
sys/dev/usb/uirdavar.h: netbsd-7-nhusb
sys/dev/usb/ukbd.c: netbsd-7-nhusb
sys/dev/usb/ukbdmap.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.h: netbsd-7-nhusb
sys/dev/usb/ulpt.c: netbsd-7-nhusb
sys/dev/usb/umass.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.h: netbsd-7-nhusb
sys/dev/usb/umass_quirks.c: netbsd-7-nhusb
sys/dev/usb/umass_quirks.h: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.c: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.h: netbsd-7-nhusb
sys/dev/usb/umassvar.h: netbsd-7-nhusb
sys/dev/usb/umcs.c: netbsd-7-nhusb
sys/dev/usb/umct.c: netbsd-7-nhusb
sys/dev/usb/umidi.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.h: netbsd-7-nhusb
sys/dev/usb/umodem.c: netbsd-7-nhusb
sys/dev/usb/umodem_common.c: netbsd-7-nhusb
sys/dev/usb/umodemvar.h: netbsd-7-nhusb
sys/dev/usb/ums.c: netbsd-7-nhusb
sys/dev/usb/uplcom.c: netbsd-7-nhusb
sys/dev/usb/urio.c: netbsd-7-nhusb
sys/dev/usb/urio.h: netbsd-7-nhusb
sys/dev/usb/usb.c: netbsd-7-nhusb
sys/dev/usb/usb.h: netbsd-7-nhusb
sys/dev/usb/usb_mem.c: netbsd-7-nhusb
sys/dev/usb/usb_mem.h: netbsd-7-nhusb
sys/dev/usb/usb_quirks.c: netbsd-7-nhusb
sys/dev/usb/usb_quirks.h: netbsd-7-nhusb
sys/dev/usb/usb_subr.c: netbsd-7-nhusb
sys/dev/usb/usbdevices.config: netbsd-7-nhusb
sys/dev/usb/usbdevs: netbsd-7-nhusb
sys/dev/usb/usbdevs.h: netbsd-7-nhusb
sys/dev/usb/usbdevs_data.h: netbsd-7-nhusb
sys/dev/usb/usbdi.c: netbsd-7-nhusb
sys/dev/usb/usbdi.h: netbsd-7-nhusb
sys/dev/usb/usbdi_util.c: netbsd-7-nhusb
sys/dev/usb/usbdi_util.h: netbsd-7-nhusb
sys/dev/usb/usbdivar.h: netbsd-7-nhusb
sys/dev/usb/usbhid.h: netbsd-7-nhusb
sys/dev/usb/usbhist.h: netbsd-7-nhusb
sys/dev/usb/usbroothub.c: netbsd-7-nhusb
sys/dev/usb/usbroothub.h: netbsd-7-nhusb
sys/dev/usb/usbroothub_subr.c: delete
sys/dev/usb/usbroothub_subr.h: delete
sys/dev/usb/uscanner.c: netbsd-7-nhusb
sys/dev/usb/uslsa.c: netbsd-7-nhusb
sys/dev/usb/usscanner.c: netbsd-7-nhusb
sys/dev/usb/ustir.c: netbsd-7-nhusb
sys/dev/usb/uthum.c: netbsd-7-nhusb
sys/dev/usb/utoppy.c: netbsd-7-nhusb
sys/dev/usb/uts.c: netbsd-7-nhusb
sys/dev/usb/uvideo.c: netbsd-7-nhusb
sys/dev/usb/uvisor.c: netbsd-7-nhusb
sys/dev/usb/uvscom.c: netbsd-7-nhusb
sys/dev/usb/uyap.c: netbsd-7-nhusb
sys/dev/usb/uyap_firmware.h: netbsd-7-nhusb
sys/dev/usb/uyurex.c: netbsd-7-nhusb
sys/dev/usb/x1input_rdesc.h: netbsd-7-nhusb
sys/dev/usb/xhci.c: netbsd-7-nhusb
sys/dev/usb/xhcireg.h: netbsd-7-nhusb
sys/dev/usb/xhcivar.h: netbsd-7-nhusb
sys/dev/usb/xinput_rdesc.h: netbsd-7-nhusb
sys/external/bsd/common/conf/files.linux: netbsd-7-nhusb
sys/external/bsd/common/include/linux/err.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/kernel.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/workqueue.h: netbsd-7-nhusb
sys/external/bsd/common/linux/linux_work.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/atombios_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/radeon_legacy_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/drm/files.drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/i915drm/files.i915drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/include/linux/err.h: delete
sys/external/bsd/drm2/include/linux/workqueue.h: delete
sys/external/bsd/drm2/linux/files.drmkms_linux: netbsd-7-nhusb
sys/external/bsd/drm2/linux/linux_work.c: delete
sys/external/bsd/dwc2/dwc2.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2var.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwctwo2netbsd: netbsd-7-nhusb
sys/external/bsd/dwc2/conf/files.dwc2: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_coreintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdddma.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hw.h: netbsd-7-nhusb
sys/modules/drmkms_linux/Makefile: netbsd-7-nhusb
sys/modules/i915drmkms/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libugenhc/ugenhc.c: netbsd-7-nhusb
sys/rump/dev/lib/libusb/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libusb/USB.ioconf: netbsd-7-nhusb
sys/rump/dev/lib/libusb/usb_at_ugenhc.c: delete
sys/rump/dev/lib/libusb/opt/opt_usb.h: delete
sys/rump/dev/lib/libusb/opt/opt_usbverbose.h: delete
sys/sys/mbuf.h: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.8: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.c: netbsd-7-nhusb
Merge netbsd-7-nhusb:
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix
- Change the SOFTINT level from NET to SERIAL for the USB softint handler.
This gives the callback a chance of running when another softint handler
at SOFTINT_NET has blocked holding a lock, e.g. softnet_lock and most of
the network stack.
- kern/49065 - ifconfig tun0 ... sequence locks up system / lockup:
softnet_lock held across usb xfr
- kern/50491 - unkillable wait in usbd_transfer while using usmsc0
on raspberry pi 2
- kern/51395 - USB Ethernet makes xhci hang
- Various improvements to slhci(4)
- Various improvements to dwc2(4)
 1.2.6.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.2.6.1 21-Nov-2013  yamt file dwctwo_plb.c was added on branch yamt-pagecache on 2014-05-22 11:40:04 +0000
 1.2.4.2 18-May-2014  rmind sync with head
 1.2.4.1 21-Nov-2013  rmind file dwctwo_plb.c was added on branch rmind-smpnet on 2014-05-18 17:45:22 +0000
 1.3.2.2 22-Sep-2015  skrll Sync with HEAD
 1.3.2.1 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.5.30.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.7.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.16 27-Feb-2021  rin Switch to intr_establish_xname().
 1.15 25-Feb-2014  martin branches: 1.15.42;
Remove unused variable
 1.14 18-Jun-2011  matt branches: 1.14.2; 1.14.12; 1.14.16;
Use <sys/foo.h> instead of <machine/foo.h> if such a file exists.
Don't assume <sys/cpu.h> includes <powerpc/subarch/cpu*.h>. Include it
explicitly.
 1.13 17-Jun-2011  matt struct device * -> device_t
struct cfdata * -> cfdata_t
split device/softc (CFATTACH_DECL_NEW)
use device_accessors and device_private
constify
 1.12 18-Mar-2010  kiyohara branches: 1.12.6;
Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.11 05-May-2006  thorpej branches: 1.11.66; 1.11.86; 1.11.88;
Remove the devprop API and switch everthing over to the new proplib. Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.
 1.10 24-Dec-2005  perry branches: 1.10.4; 1.10.6; 1.10.8; 1.10.10; 1.10.12;
bare asm -> __asm
 1.9 11-Dec-2005  christos merge ktrace-lwp.
 1.8 15-Jul-2003  lukem branches: 1.8.16;
__KERNEL_RCSID()
 1.7 11-Mar-2003  hannken branches: 1.7.2;
Add support for the IBM 403GCX cpu. Enabled with "options PPC_IBM403".

- different set of device control registers.
- non-standard access to the time base.
- 16 byte cache lines.

Approved by: Eduardo Horvath <eeh@netbsd.org>
 1.6 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.5 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.2 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.1 23-Aug-2002  scw branches: 1.1.2; 1.1.4; 1.1.6;
Add "ecc at plb" device.
Add an "irq" locator to the plb device.
This gets rid of the original hack where ecc support was wedged into
the cpu driver.
 1.1.6.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 23-Aug-2002  jdolecek file ecc_plb.c was added on branch kqueue on 2002-09-06 08:39:06 +0000
 1.1.4.2 31-Aug-2002  gehenna catch up with -current.
 1.1.4.1 23-Aug-2002  gehenna file ecc_plb.c was added on branch gehenna-devsw on 2002-08-31 13:45:44 +0000
 1.1.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.2 27-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 23-Aug-2002  nathanw file ecc_plb.c was added on branch nathanw_sa on 2002-08-27 23:45:07 +0000
 1.7.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.7.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.1 21-Jun-2006  yamt sync with head.
 1.10.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.10.10.1 11-May-2006  elad sync with head
 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.88.1 30-May-2010  rmind sync with head
 1.11.86.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.11.66.1 11-Aug-2010  yamt sync with head.
 1.12.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.14.16.1 18-May-2014  rmind sync with head
 1.14.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.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.15.42.1 03-Apr-2021  thorpej Sync with HEAD.
 1.6 02-Nov-2024  andvar s/aboce/above/ and s/Abobe/Above/ in comments.
 1.5 30-Mar-2021  rin branches: 1.5.22;
Support OPB running @ 33MHz for 405GP based boards.
No need to modify EMAC_MR1 register this case
(STACR_OPBC fields are reserved for 405GP).
 1.4 06-Jul-2020  rin branches: 1.4.2; 1.4.4;
Style and cosmetic changes. No binary changes intended.
 1.3 18-Mar-2010  kiyohara Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.2 16-Oct-2006  kiyohara branches: 1.2.56; 1.2.76; 1.2.78;
do bus_space_map() to get bus space handle in emacs_attach()
 1.1 13-Aug-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6; 1.1.28; 1.1.58; 1.1.60;
Split out device register definitions to their own files as the are
common across many of the 4xx parts. Leaves ibm405gp.h with device
address information specific to the 405GP CPU. Now allows opb.c to
support multiple 4xx CPU types.
 1.1.60.1 22-Oct-2006  yamt sync with head
 1.1.58.1 18-Nov-2006  ad Sync with head.
 1.1.28.1 30-Dec-2006  yamt sync with head.
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 13-Aug-2002  jdolecek file emacreg.h was added on branch kqueue on 2002-09-06 08:39:07 +0000
 1.1.4.2 31-Aug-2002  gehenna catch up with -current.
 1.1.4.1 13-Aug-2002  gehenna file emacreg.h was added on branch gehenna-devsw on 2002-08-31 13:45:44 +0000
 1.1.2.2 27-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 13-Aug-2002  nathanw file emacreg.h was added on branch nathanw_sa on 2002-08-27 23:45:08 +0000
 1.2.78.1 30-May-2010  rmind sync with head
 1.2.76.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.2.56.1 11-Aug-2010  yamt sync with head.
 1.4.4.1 03-Apr-2021  thorpej Sync with HEAD.
 1.4.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.5.22.1 02-Aug-2025  perseant Sync with HEAD
 1.5 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.4 24-Apr-2021  thorpej branches: 1.4.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.3 17-Jun-2011  matt branches: 1.3.68;
struct device * -> device_t
struct cfdata * -> cfdata_t
split device/softc (CFATTACH_DECL_NEW)
use device_accessors and device_private
constify
 1.2 06-Nov-2010  uebayasi branches: 1.2.2; 1.2.8; 1.2.10;
Add IBM405GPr "External Bus" driver.
 1.1 11-Aug-2010  uebayasi branches: 1.1.2;
file exb.c was initially added on branch uebayasi-xip.
 1.1.2.2 19-Aug-2010  uebayasi Define FlashROM addresses in board specific code.
 1.1.2.1 11-Aug-2010  uebayasi Implement 405GPr's "External Bus" as exb(4).
 1.2.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2.8.2 05-Mar-2011  rmind sync with head
 1.2.8.1 06-Nov-2010  rmind file exb.c was added on branch rmind-uvmplock on 2011-03-05 20:51:36 +0000
 1.2.2.2 10-Jan-2011  jym Sync with HEAD
 1.2.2.1 06-Nov-2010  jym file exb.c was added on branch jym-xensuspend on 2011-01-10 00:37:36 +0000
 1.3.68.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.3.68.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 06-Nov-2010  uebayasi branches: 1.2.2; 1.2.8;
Add IBM405GPr "External Bus" driver.
 1.1 11-Aug-2010  uebayasi branches: 1.1.2;
file exbvar.h was initially added on branch uebayasi-xip.
 1.1.2.1 11-Aug-2010  uebayasi Implement 405GPr's "External Bus" as exb(4).
 1.2.8.2 05-Mar-2011  rmind sync with head
 1.2.8.1 06-Nov-2010  rmind file exbvar.h was added on branch rmind-uvmplock on 2011-03-05 20:51:36 +0000
 1.2.2.2 10-Jan-2011  jym Sync with HEAD
 1.2.2.1 06-Nov-2010  jym file exbvar.h was added on branch jym-xensuspend on 2011-01-10 00:37:36 +0000
 1.1 11-Aug-2010  uebayasi branches: 1.1.2;
file flash_exb.c was initially added on branch uebayasi-xip.
 1.1.2.1 11-Aug-2010  uebayasi Implement flash(4) glue at exb(4).
 1.13 15-Sep-2025  thorpej Encapsulate what's needed to attach an I2C bus into a iicbus_attach()
inline.
 1.12 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.11 24-Apr-2021  thorpej branches: 1.11.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.10 22-Dec-2019  thorpej branches: 1.10.10;
Cleanup i2c bus acquire / release, centralizing all of the logic into
iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks
no longer need to be provided by back-end controller drivers (only if
they need special handling, e.g. powering on the i2c controller).
This results in the removal of a bunch of rendundant code from each
back-end controller driver.

Assert that we are not in hard interrupt context in iic_acquire_bus(),
iic_exec(), and iic_release_bus().
 1.9 18-Jun-2011  matt branches: 1.9.54;
Use <sys/foo.h> instead of <machine/foo.h> if such a file exists.
Don't assume <sys/cpu.h> includes <powerpc/subarch/cpu*.h>. Include it
explicitly.
 1.8 17-Jun-2011  matt struct device * -> device_t
struct cfdata * -> cfdata_t
split device/softc (CFATTACH_DECL_NEW)
use device_accessors and device_private
constify
 1.7 12-Jun-2011  kiyohara Initialize i2cbus_attach_args before call config_found(). It has other member.
 1.6 12-Jul-2008  tsutsui branches: 1.6.26;
- if SDA is set to low during DIR(INPUT) in gpiic_set_bits(),
store the SDA status into softc and enable it once after
DIR() is changed to OUTPUT in gpiic_set_dir()
- remove "Read in output mode" warning in gpiic_read_bits()
since it's a vaild operation (to read SCL during SDA output is low)

Tested by kiyohara@ on OPENBLOCKS266.
 1.5 06-Dec-2007  ad branches: 1.5.12; 1.5.16; 1.5.18; 1.5.20; 1.5.22;
lockmgr -> mutex
 1.4 26-Jun-2006  drochner branches: 1.4.18; 1.4.32; 1.4.34; 1.4.40; 1.4.44;
use the "i2cbus" interface attribute rather than putting a string name
into the i2cbus attach args
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.8; 1.3.16;
merge ktrace-lwp.
 1.2 06-Oct-2003  scw branches: 1.2.4; 1.2.18;
Gah. Pick up the MI i2c headers from the right place.
Pointed out by Shigeyuki Fukushima on port-powerpc@.
 1.1 06-Oct-2003  scw MD i2c glue for the 405GP's onboard IIC controller.
Bit-bang only for now.
 1.2.18.2 07-Dec-2007  yamt sync with head
 1.2.18.1 30-Dec-2006  yamt sync with head.
 1.2.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.2.4.2 03-Aug-2004  skrll Sync with HEAD
 1.2.4.1 06-Oct-2003  skrll file gpiic_opb.c was added on branch ktrace-lwp on 2004-08-03 10:39:28 +0000
 1.3.16.1 13-Jul-2006  gdamore Merge from HEAD.
 1.3.8.1 11-Aug-2006  yamt sync with head
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.4.44.1 08-Dec-2007  ad Sync with head.
 1.4.40.1 08-Dec-2007  mjf Sync with HEAD.
 1.4.34.1 09-Jan-2008  matt sync with HEAD
 1.4.32.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.4.18.1 09-Dec-2007  reinoud Pullup to HEAD
 1.5.22.1 19-Oct-2008  haad Sync with HEAD.
 1.5.20.1 18-Jul-2008  simonb Sync with head.
 1.5.18.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.5.16.1 04-May-2009  yamt sync with head.
 1.5.12.1 28-Sep-2008  mjf Sync with HEAD.
 1.6.26.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.9.54.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.10.10.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.11.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 24-Dec-2022  andvar s/Reqest/Request/ and adding apostrophe for don't and didn't in comments.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 06-Oct-2003  scw branches: 1.1.4;
MD i2c glue for the 405GP's onboard IIC controller.
Bit-bang only for now.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 06-Oct-2003  skrll file gpiicreg.h was added on branch ktrace-lwp on 2004-08-03 10:39:28 +0000
 1.10 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.9 24-Apr-2021  thorpej branches: 1.9.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.8 17-Jun-2011  matt branches: 1.8.68;
struct device * -> device_t
struct cfdata * -> cfdata_t
split device/softc (CFATTACH_DECL_NEW)
use device_accessors and device_private
constify
 1.7 18-Mar-2010  kiyohara branches: 1.7.6;
Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.6 06-Feb-2007  simonb branches: 1.6.48; 1.6.68; 1.6.70;
Fix a tyop in a comment.
 1.5 13-Mar-2006  shige branches: 1.5.10;
IBM4xx on-chip GPIO controller apllying MI GPIO framework.
 1.4 11-Dec-2005  christos branches: 1.4.4; 1.4.6; 1.4.8; 1.4.10;
merge ktrace-lwp.
 1.3 16-Oct-2005  he Complete the renaming gpio -> ppcgpio for evbppc, to make room for
the MI gpio. Internal static functions in gpio_opb.c are not
renamed here, but the softc type is renamed together with the attach
declaration data.
 1.2 26-Aug-2005  drochner s/locdesc_t/int/g
 1.1 23-Jan-2005  shige branches: 1.1.2; 1.1.10; 1.1.12;
Add driver for On-chip General Purpose I/O.
 1.1.12.2 26-Feb-2007  yamt sync with head.
 1.1.12.1 21-Jun-2006  yamt sync with head.
 1.1.10.2 29-Apr-2005  kent sync with -current
 1.1.10.1 23-Jan-2005  kent file gpio_opb.c was added on branch kent-audio2 on 2005-04-29 11:28:20 +0000
 1.1.2.3 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.2 24-Jan-2005  skrll Sync with HEAD.
 1.1.2.1 23-Jan-2005  skrll file gpio_opb.c was added on branch ktrace-lwp on 2005-01-24 08:34:26 +0000
 1.4.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.4.8.1 01-Apr-2006  yamt sync with head.
 1.4.6.1 22-Apr-2006  simonb Sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.5.10.1 09-Feb-2007  ad Sync with HEAD.
 1.6.70.1 30-May-2010  rmind sync with head
 1.6.68.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.6.48.1 11-Aug-2010  yamt sync with head.
 1.7.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.8.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.9.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 13-Mar-2006  shige IBM4xx on-chip GPIO controller apllying MI GPIO framework.
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.6; 1.3.8; 1.3.10;
merge ktrace-lwp.
 1.2 23-Jan-2005  shige branches: 1.2.8;
Add driver for On-chip General Purpose I/O.
 1.1 13-Aug-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6; 1.1.12; 1.1.20;
Split out device register definitions to their own files as the are
common across many of the 4xx parts. Leaves ibm405gp.h with device
address information specific to the 405GP CPU. Now allows opb.c to
support multiple 4xx CPU types.
 1.1.20.1 29-Apr-2005  kent sync with -current
 1.1.12.1 24-Jan-2005  skrll Sync with HEAD.
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 13-Aug-2002  jdolecek file gpioreg.h was added on branch kqueue on 2002-09-06 08:39:07 +0000
 1.1.4.2 31-Aug-2002  gehenna catch up with -current.
 1.1.4.1 13-Aug-2002  gehenna file gpioreg.h was added on branch gehenna-devsw on 2002-08-31 13:45:44 +0000
 1.1.2.2 27-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 13-Aug-2002  nathanw file gpioreg.h was added on branch nathanw_sa on 2002-08-27 23:45:09 +0000
 1.2.8.1 21-Jun-2006  yamt sync with head.
 1.3.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.3.8.1 01-Apr-2006  yamt sync with head.
 1.3.6.1 22-Apr-2006  simonb Sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.3 13-Mar-2006  shige IBM4xx on-chip GPIO controller applying MI GPIO framework.
 1.2 11-Dec-2005  christos branches: 1.2.4; 1.2.6; 1.2.8; 1.2.10;
merge ktrace-lwp.
 1.1 23-Jan-2005  shige branches: 1.1.2; 1.1.10; 1.1.12;
Add driver for On-chip General Purpose I/O.
 1.1.12.1 21-Jun-2006  yamt sync with head.
 1.1.10.2 29-Apr-2005  kent sync with -current
 1.1.10.1 23-Jan-2005  kent file gpiovar.h was added on branch kent-audio2 on 2005-04-29 11:28:20 +0000
 1.1.2.2 24-Jan-2005  skrll Sync with HEAD.
 1.1.2.1 23-Jan-2005  skrll file gpiovar.h was added on branch ktrace-lwp on 2005-01-24 08:34:27 +0000
 1.2.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.2.8.1 01-Apr-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.8 19-Oct-2016  nonaka Added MSI/MSI-X and interrupt_distribute(9) support for powerpc.
 1.7 17-Aug-2011  matt branches: 1.7.12; 1.7.30; 1.7.34;
First pass of the new PCI MSI/MSI ABI definitions. (return EOPNOTSUPP for
now).
 1.6 22-Jun-2011  matt Add support pci_intr_setattr.
Export non-inline version of pci api for modules (_MODULE is defined).
Fix definition of pc_conf_hook and pc_conf_interrupt.
Switch to using inlines instead of macros.
Switch ibm4xx to use <powerpc/pci_machdep.h>
 1.5 18-Jun-2011  matt Use <sys/foo.h> instead of <machine/foo.h> if such a file exists.
Don't assume <sys/cpu.h> includes <powerpc/subarch/cpu*.h>. Include it
explicitly.
 1.4 11-Dec-2005  christos branches: 1.4.110;
merge ktrace-lwp.
 1.3 25-Jul-2003  scw Switch ibm4xx over to using the more flexible powerpc bus_space/bus_dma code.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 09-Dec-2002  scw branches: 1.1.2; 1.1.8;
Changes/additions to support evbppc.
 1.1.8.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.8.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.8.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 09-Dec-2002  thorpej file ibm405gp.c was added on branch nathanw_sa on 2002-12-11 06:11:39 +0000
 1.4.110.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.7.34.1 04-Nov-2016  pgoyette Sync with HEAD
 1.7.30.1 05-Dec-2016  skrll Sync with HEAD
 1.7.12.1 03-Dec-2017  jdolecek update from HEAD
 1.60 04-Oct-2025  thorpej Add a shared function to query the common properties used for configuring
an Ethernet address.
 1.59 10-Feb-2024  andvar s/alloted/allotted/ in comments.
 1.58 02-Feb-2024  andvar fix typos, mainly s/unsupport/unsupported/ in log messages.
 1.57 18-Sep-2022  thorpej Eliminate use of IFF_OACTIVE.
 1.56 30-Mar-2021  rin Support OPB running @ 33MHz for 405GP based boards.
No need to modify EMAC_MR1 register this case
(STACR_OPBC fields are reserved for 405GP).
 1.55 27-Feb-2021  rin branches: 1.55.2;
Switch to intr_establish_xname().
 1.54 24-Jan-2021  rin Add rnd(9) support.
 1.53 06-Jul-2020  rin branches: 1.53.2;
Style and cosmetic changes. No binary changes intended.
 1.52 29-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.51 28-May-2019  msaitoh branches: 1.51.4;
Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.50 23-May-2019  msaitoh -No functional change:
- KNF
- u_int*_t -> uint*_t.
 1.49 22-Jan-2019  msaitoh Change MII PHY read/write API from:

int (*mii_readreg_t)(device_t, int, int);
void (*mii_writereg_t)(device_t, int, int, int);
to:

int (*mii_readreg_t)(device_t, int, int, uint16_t *);
int (*mii_writereg_t)(device_t, int, int, uint16_t);

Now we can test if a read/write operation failed or not by the return value.

In 802.3 spec says that the PHY shall not respond to read/write transaction
to the unimplemented register(22.2.4.3). Detecting timeout can be used to
check whether a register is implemented or not (if the register conforms to
the spec). ukphy(4) can be used this for MII_MMDACR and MII_MMDAADR.

Note that I noticed that the following code do infinite loop in the
read/wirte function. If it accesses unimplemented PHY register, it will hang.
It should be fixed:

arm/at91/at91emac.c
arm/ep93xx/epe.c
arm/omap/omapl1x_emac.c
mips/ralink/ralink_eth.c
arch/powerpc/booke/dev/pq3etsec.c(read)
dev/cadence/if_cemac.c <- hkenken
dev/ic/lan9118.c


Tested with the following device:

axe+ukphy
axe+rgephy
axen+rgephy (tested by Andrius V)
wm+atphy
wm+ukphy
wm+igphy
wm+ihphy
wm+makphy
sk+makphy
sk+brgphy
sk+gentbi
msk+makphy
sip+icsphy
sip+ukphy
re+rgephy
bge+brgphy
bnx+brgphy
gsip+gphyter
rtk+rlphy
fxp+inphy (tested by Andrius V)
tlp+acphy
ex+exphy
epic+qsphy
vge+ciphy (tested by Andrius V)
vr+ukphy (tested by Andrius V)
vte+ukphy (tested by Andrius V)

Not tested (MAC):
arm:at91emac
arm:cemac
arm:epe
arm:geminigmac
arm:enet
arm:cpsw
arm:emac(omac)
arm:emac(sunxi)
arm:npe
evbppc:temac
macppc:bm
macppc:gm
mips:aumac
mips:ae
mips:cnmac
mips:reth
mips:sbmac
playstation2:smap
powerpc:tsec
powerpc:emac(ibm4xx)
sgimips:mec
sparc:be
sf
ne(ax88190, dl10019)
awge
ep
gem
hme
smsh
mtd
sm
age
alc
ale
bce
cas
et
jme
lii
nfe
pcn
ste
stge
tl
xi
aue
mue
smsc
udav
url

Not tested (PHY):
amhphy
bmtphy
dmphy
etphy
glxtphy
ikphy
iophy
lxtphy
nsphyter
pnaphy
rdcphy
sqphy
tlphy
tqphy
urlphy
 1.48 26-Jun-2018  msaitoh branches: 1.48.2;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.47 15-Dec-2016  ozaki-r branches: 1.47.14;
Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
- Where/When if_ipackets is counted up
- Note that some drivers still update packet statistics in their own
way (periodical update)
- Moved bpf_mtap run in softint
- This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
 1.46 08-Dec-2016  ozaki-r Apply deferred if_start framework

if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.
 1.45 10-Jun-2016  ozaki-r branches: 1.45.2;
Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
 1.44 09-Feb-2016  ozaki-r Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.43 16-Oct-2014  snj branches: 1.43.2;
fix typo in comment
 1.42 26-Jun-2014  msaitoh Pass MIIF_DOPAUSE mask to mii_attach() in if_emac.c. emac(4) change a
register from IFM_FLOW flag, so this change is required to control the
setting via ifconfig. PR#48950. OK'd by matt@.
 1.41 22-Jul-2012  matt branches: 1.41.2; 1.41.12;
Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixes
problem with a common MDIO bus used for multiple interfaces.
Some drivers converted to CFATTACL_DECL_NEW.
 1.40 24-Jun-2012  kiyohara Flush current empty descriptor in emac_rxeob_intr().
 1.39 18-Jun-2011  matt branches: 1.39.2;
Use <sys/foo.h> instead of <machine/foo.h> if such a file exists.
Don't assume <sys/cpu.h> includes <powerpc/subarch/cpu*.h>. Include it
explicitly.
 1.38 17-Jun-2011  matt struct device * -> device_t
struct cfdata * -> cfdata_t
split device/softc (CFATTACH_DECL_NEW)
use device_accessors and device_private
constify
 1.37 05-Apr-2010  joerg branches: 1.37.6;
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.36 18-Mar-2010  kiyohara Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.35 22-Jan-2010  martin branches: 1.35.2; 1.35.4;
Unify the name of the device property to hold a MAC address - there was
no clear majority for either "mac-addr" vs. "mac-address", but a quick
gallup poll among developers selected the latter.
 1.34 19-Jan-2010  pooka Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.33 08-Jul-2008  kiyohara Initialize the member sc_callout before call callout_reset().
 1.32 22-Jan-2008  he branches: 1.32.6; 1.32.10; 1.32.12; 1.32.14; 1.32.16;
Delete a now-unused local variable.
 1.31 19-Jan-2008  dyoung Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange(). Check for
a non-ENXIO error return from mii_mediachg(). (ENXIO indicates
that a PHY is suspended.)

This patch shrinks the source code size by 979 lines. There was
a 5100-byte savings on the NetBSD/i386 kernel configuration, ALL.

I have made a few miscellaneous changes, too:

gem(4): use LIST_EMPTY(), LIST_FOREACH().
mtd(4): handle media ioctls, for a change!
axe(4): do not track link status in sc->axe_link any longer
nfe(4), aue(4), axe(4), udav(4), url(4): do not reset all PHYs
on a change of media

Except for the change to mtd(4), no functional changes are intended.

XXX This patch affects more architectures than I can feasibly
XXX compile and run. I have compiled macppc, sparc64, i386. I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.
 1.30 17-Oct-2007  garbled branches: 1.30.2; 1.30.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.29 26-Aug-2007  dyoung branches: 1.29.2;
Constify.
 1.28 04-Mar-2007  christos branches: 1.28.2; 1.28.10; 1.28.14; 1.28.18;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.27 16-Oct-2006  kiyohara branches: 1.27.4;
do bus_space_map() to get bus space handle in emacs_attach()
 1.26 05-May-2006  thorpej branches: 1.26.8; 1.26.10;
Remove the devprop API and switch everthing over to the new proplib. Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.
 1.25 20-Feb-2006  thorpej branches: 1.25.2; 1.25.4; 1.25.6;
Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
 1.24 18-Feb-2006  thorpej - Don't expose dev_propdb directly -- provide devprop_*() wrappers instead.
- Rework the ARMADILLO / epe device properties interaction so that it actually
associates the MAC address property with the epe device instance.
 1.23 11-Dec-2005  christos branches: 1.23.2; 1.23.4; 1.23.6;
merge ktrace-lwp.
 1.22 30-Jan-2005  thorpej branches: 1.22.6;
Eliminate use of M_HASFCS.
 1.21 21-Jan-2005  simonb branches: 1.21.2;
Set up last segment descriptor to send an interrupt after that
descriptor is transmitted, and bypass existing Tx descriptor reaping
method (for now...).

Fixes problems with bad NFS write performance.
 1.20 21-Jan-2005  simonb In emac_txeob_intr():
- return 1 if we processed any completed tx packets.
- try to get more packets going by calling emac_start().
 1.19 30-Oct-2004  thorpej branches: 1.19.4;
When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
 1.18 24-Mar-2004  simonb branches: 1.18.4;
Add promiscuous and multicast support.

From KIYOHARA Takashi in PR port-powerpc/23892.
 1.17 27-Oct-2003  simonb Keep bogus gcc -Wuninitialised warnings happy.
 1.16 15-Oct-2003  simonb Correct a test for setting IFF_OACTIVE on the interface.
 1.15 15-Jul-2003  lukem __KERNEL_RCSID()
 1.14 04-Jul-2003  thorpej Consult the "mac-addr" property associated with the emac device in
the dev_propdb rather than referencing board_data.
 1.13 02-Oct-2002  thorpej branches: 1.13.6;
Add trailing ; to CFATTACH_DECL.
 1.12 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.11 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.10 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.9 13-Aug-2002  simonb Use the base space tag from the attach args, don't recreate it all the
time.
Clean up some include files.
 1.8 13-Aug-2002  simonb Use "ibm4xx" instead of "galaxy"; galaxy was an early code name for the
405GP.
 1.7 13-Aug-2002  simonb Fix include file location botch in previous.
 1.6 13-Aug-2002  simonb Split out device register definitions to their own files as the are
common across many of the 4xx parts. Leaves ibm405gp.h with device
address information specific to the 405GP CPU. Now allows opb.c to
support multiple 4xx CPU types.
 1.5 12-Aug-2002  simonb Reorganise the IBM 4xx bus layout, using terminology from the IBM
documentation:
- Remove "mainbus" altogether.
- The new root is "plb" - the Processor Local Bus.
- Attached to this is the "opb" - the On-chip Peripheral Bus, to which
all the on-chip devices are attached (except the cpu and pci host
bridge).
- Port-specific code can pass an array of 'struct plb_dev' to
config_rootfound() to attach extra devices to the plb. The walnut
port attaches a "pbus" (Peripheral Bus) in here for the RTC and
pc keyboard controller to attach to.
There is still much 405GP specific code; the next round of changes will
generalise this to enable easier support for other 4xx CPUs.
 1.4 09-Aug-2002  simonb Fix for when EMAC_EVENT_COUNTERS isn't defined. Problem reported by
Allen Briggs.
 1.3 09-Aug-2002  simonb Add a driver the for IBM 405gp (and possibly other IBM 4xx cpus) ethernet
MAC (emac). Much thanks to Jason Thorpe for debugging help writing this
driver. Tested on the walnut, and an earlier version of this driver works
on the OpenBlockSS.
 1.2 15-Mar-2002  eeh branches: 1.2.4;
Use new non-PCI mainbus.
 1.1 24-Jun-2001  simonb branches: 1.1.2; 1.1.8;
Move on-chip 405GP devices to powerpc/ibm4xx/dev.
 1.1.8.5 18-Oct-2002  nathanw Catch up to -current.
 1.1.8.4 27-Aug-2002  nathanw Catch up to -current.
 1.1.8.3 13-Aug-2002  nathanw Catch up to -current.
 1.1.8.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.8.1 24-Jun-2001  nathanw file if_emac.c was added on branch nathanw_sa on 2002-04-01 07:42:03 +0000
 1.1.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.4.1 31-Aug-2002  gehenna catch up with -current.
 1.13.6.6 04-Feb-2005  skrll Sync with HEAD.
 1.13.6.5 24-Jan-2005  skrll Sync with HEAD.
 1.13.6.4 02-Nov-2004  skrll Sync with HEAD.
 1.13.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.6.1 03-Aug-2004  skrll Sync with HEAD
 1.18.4.1 24-Jan-2005  he Pull up revision 1.19 (requested by thorpej in ticket #939):
When adding or deleting multicast addresses, only change
the address filter if the interface is marked RUNNING.
Fixes PR#27678.
 1.19.4.1 29-Apr-2005  kent sync with -current
 1.21.2.1 12-Feb-2005  yamt sync with head.
 1.22.6.5 04-Feb-2008  yamt sync with head.
 1.22.6.4 21-Jan-2008  yamt sync with head
 1.22.6.3 03-Sep-2007  yamt sync with head.
 1.22.6.2 30-Dec-2006  yamt sync with head.
 1.22.6.1 21-Jun-2006  yamt sync with head.
 1.23.6.2 01-Jun-2006  kardel Sync with head.
 1.23.6.1 22-Apr-2006  simonb Sync with head.
 1.23.4.1 09-Sep-2006  rpaulo sync with head
 1.23.2.2 01-Mar-2006  yamt sync with head.
 1.23.2.1 18-Feb-2006  yamt sync with head.
 1.25.6.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.25.4.1 11-May-2006  elad sync with head
 1.25.2.1 24-May-2006  yamt sync with head.
 1.26.10.1 22-Oct-2006  yamt sync with head
 1.26.8.1 18-Nov-2006  ad Sync with head.
 1.27.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.28.18.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.28.14.1 03-Sep-2007  skrll Sync with HEAD.
 1.28.10.1 03-Oct-2007  garbled Sync with HEAD
 1.28.2.1 09-Oct-2007  ad Sync with head.
 1.29.2.2 23-Mar-2008  matt sync with HEAD
 1.29.2.1 06-Nov-2007  matt sync with HEAD
 1.30.8.2 23-Jan-2008  bouyer Sync with HEAD.
 1.30.8.1 20-Jan-2008  bouyer Sync with HEAD
 1.30.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.32.16.1 19-Oct-2008  haad Sync with HEAD.
 1.32.14.1 18-Jul-2008  simonb Sync with head.
 1.32.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.32.10.3 11-Aug-2010  yamt sync with head.
 1.32.10.2 11-Mar-2010  yamt sync with head
 1.32.10.1 04-May-2009  yamt sync with head.
 1.32.6.1 28-Sep-2008  mjf Sync with HEAD.
 1.35.4.1 30-May-2010  rmind sync with head
 1.35.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.37.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.39.2.1 30-Oct-2012  yamt sync with head
 1.41.12.1 10-Aug-2014  tls Rebase.
 1.41.2.2 03-Dec-2017  jdolecek update from HEAD
 1.41.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.43.2.3 05-Feb-2017  skrll Sync with HEAD
 1.43.2.2 09-Jul-2016  skrll Sync with HEAD
 1.43.2.1 19-Mar-2016  skrll Sync with HEAD
 1.45.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.47.14.2 26-Jan-2019  pgoyette Sync with HEAD
 1.47.14.1 28-Jul-2018  pgoyette Sync with HEAD
 1.48.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.48.2.1 10-Jun-2019  christos Sync with HEAD
 1.51.4.1 29-Feb-2020  ad Sync with head.
 1.53.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.55.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 24-Jun-2001  simonb branches: 1.1.8;
Move on-chip 405GP devices to powerpc/ibm4xx/dev.
 1.1.8.2 24-Jun-2001  simonb Move on-chip 405GP devices to powerpc/ibm4xx/dev.
 1.1.8.1 24-Jun-2001  simonb file if_emacreg.h was added on branch nathanw_sa on 2001-06-24 02:13:38 +0000
 1.1 18-Mar-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.6;
Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 18-Mar-2010  yamt file if_emacvar.h was added on branch yamt-nfs-mp on 2010-08-11 22:52:33 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 18-Mar-2010  rmind file if_emacvar.h was added on branch rmind-uvmplock on 2010-05-30 05:17:02 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 18-Mar-2010  uebayasi file if_emacvar.h was added on branch uebayasi-xip on 2010-04-30 14:39:42 +0000
 1.2 06-Oct-2003  scw MD i2c glue for the 405GP's onboard IIC controller.
Bit-bang only for now.
 1.1 23-Sep-2003  shige Add on-chip IIC driver.
Add some definitions for IIC driver.
 1.4 06-Oct-2003  scw MD i2c glue for the 405GP's onboard IIC controller.
Bit-bang only for now.
 1.3 23-Sep-2003  shige Add on-chip IIC driver.
Add some definitions for IIC driver.
 1.2 01-May-2003  scw branches: 1.2.2;
Add bit definitions for some registers.
 1.1 13-Aug-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6;
Split out device register definitions to their own files as the are
common across many of the 4xx parts. Leaves ibm405gp.h with device
address information specific to the 405GP CPU. Now allows opb.c to
support multiple 4xx CPU types.
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 13-Aug-2002  jdolecek file iicreg.h was added on branch kqueue on 2002-09-06 08:39:08 +0000
 1.1.4.2 31-Aug-2002  gehenna catch up with -current.
 1.1.4.1 13-Aug-2002  gehenna file iicreg.h was added on branch gehenna-devsw on 2002-08-31 13:45:44 +0000
 1.1.2.2 27-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 13-Aug-2002  nathanw file iicreg.h was added on branch nathanw_sa on 2002-08-27 23:45:11 +0000
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.2 06-Oct-2003  scw MD i2c glue for the 405GP's onboard IIC controller.
Bit-bang only for now.
 1.1 23-Sep-2003  shige Add on-chip IIC driver.
Add some definitions for IIC driver.
 1.5 19-Jun-2023  msaitoh Fix typo. unknwon -> unknown
 1.4 27-Feb-2021  rin Switch to intr_establish_xname().
 1.3 18-Jun-2011  matt branches: 1.3.66;
Use __builtin_clz instead of our own cntlzw
 1.2 18-Jun-2011  matt Use <sys/foo.h> instead of <machine/foo.h> if such a file exists.
Don't assume <sys/cpu.h> includes <powerpc/subarch/cpu*.h>. Include it
explicitly.
 1.1 18-Mar-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.6; 1.1.12;
Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.1.12.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 18-Mar-2010  yamt file mal.c was added on branch yamt-nfs-mp on 2010-08-11 22:52:33 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 18-Mar-2010  rmind file mal.c was added on branch rmind-uvmplock on 2010-05-30 05:17:02 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 18-Mar-2010  uebayasi file mal.c was added on branch uebayasi-xip on 2010-04-30 14:39:42 +0000
 1.3.66.1 03-Apr-2021  thorpej Sync with HEAD.
 1.1 18-Mar-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.6;
Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 18-Mar-2010  yamt file malvar.h was added on branch yamt-nfs-mp on 2010-08-11 22:52:33 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 18-Mar-2010  rmind file malvar.h was added on branch rmind-uvmplock on 2010-05-30 05:17:02 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 18-Mar-2010  uebayasi file malvar.h was added on branch uebayasi-xip on 2010-04-30 14:39:42 +0000
 1.29 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.28 24-Apr-2021  thorpej branches: 1.28.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.27 06-Jul-2020  rin branches: 1.27.4;
Style and cosmetic changes. No binary changes intended.
 1.26 18-Jun-2011  matt Use <sys/foo.h> instead of <machine/foo.h> if such a file exists.
Don't assume <sys/cpu.h> includes <powerpc/subarch/cpu*.h>. Include it
explicitly.
 1.25 18-Mar-2010  kiyohara branches: 1.25.6;
Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.24 25-Feb-2010  matt branches: 1.24.2;
Adapt to spr.h breakup.
 1.23 13-Mar-2006  shige branches: 1.23.68; 1.23.88; 1.23.92;
IBM4xx on-chip GPIO controller apllying MI GPIO framework.
 1.22 21-Feb-2006  thorpej branches: 1.22.2; 1.22.4;
Add an "instance" member to opb_attach_args and use it when fetching
the mac-address property from board_info. port-powerpc/32862
 1.21 11-Dec-2005  christos branches: 1.21.2; 1.21.4; 1.21.6;
merge ktrace-lwp.
 1.20 26-Aug-2005  drochner s/locdesc_t/int/g
 1.19 03-Jul-2005  he branches: 1.19.2;
We need to name parameters in function declaration...
 1.18 28-Jun-2005  drochner 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 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.16 06-Oct-2003  scw MD i2c glue for the 405GP's onboard IIC controller.
Bit-bang only for now.
 1.15 23-Sep-2003  shige Add devices info for IBM405GPR.
 1.14 25-Jul-2003  scw Switch ibm4xx over to using the more flexible powerpc bus_space/bus_dma code.
 1.13 15-Jul-2003  lukem __KERNEL_RCSID()
 1.12 01-Jan-2003  thorpej branches: 1.12.2;
Use aprint_normal() for cfprint routines.
 1.11 10-Oct-2002  jdolecek fix typo - driver name is 'opb', not 'obp'
 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 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.5 13-Aug-2002  simonb branches: 1.5.2; 1.5.4;
Use the base space tag from the attach args, don't recreate it all the
time.
Clean up some include files.
 1.4 13-Aug-2002  simonb Use "ibm4xx" instead of "galaxy"; galaxy was an early code name for the
405GP.
 1.3 13-Aug-2002  simonb Split out device register definitions to their own files as the are
common across many of the 4xx parts. Leaves ibm405gp.h with device
address information specific to the 405GP CPU. Now allows opb.c to
support multiple 4xx CPU types.
 1.2 12-Aug-2002  simonb branches: 1.2.2;
Add a pvr field to 'struct opb_dev', to allow the opb_devs array to
contain info about on-chip devices for more than one CPU type.
 1.1 12-Aug-2002  simonb Reorganise the IBM 4xx bus layout, using terminology from the IBM
documentation:
- Remove "mainbus" altogether.
- The new root is "plb" - the Processor Local Bus.
- Attached to this is the "opb" - the On-chip Peripheral Bus, to which
all the on-chip devices are attached (except the cpu and pci host
bridge).
- Port-specific code can pass an array of 'struct plb_dev' to
config_rootfound() to attach extra devices to the plb. The walnut
port attaches a "pbus" (Peripheral Bus) in here for the RTC and
pc keyboard controller to attach to.
There is still much 405GP specific code; the next round of changes will
generalise this to enable easier support for other 4xx CPUs.
 1.2.2.5 03-Jan-2003  thorpej Sync with HEAD.
 1.2.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.3 27-Aug-2002  nathanw Catch up to -current.
 1.2.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.2.2.1 12-Aug-2002  nathanw file opb.c was added on branch nathanw_sa on 2002-08-13 02:18:43 +0000
 1.5.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.5.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.5.4.1 13-Aug-2002  jdolecek file opb.c was added on branch kqueue on 2002-09-06 08:39:08 +0000
 1.5.2.2 31-Aug-2002  gehenna catch up with -current.
 1.5.2.1 13-Aug-2002  gehenna file opb.c was added on branch gehenna-devsw on 2002-08-31 13:45:44 +0000
 1.12.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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.19.2.1 21-Jun-2006  yamt sync with head.
 1.21.6.1 22-Apr-2006  simonb Sync with head.
 1.21.4.1 09-Sep-2006  rpaulo sync with head
 1.21.2.1 01-Mar-2006  yamt sync with head.
 1.22.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.22.2.1 01-Apr-2006  yamt sync with head.
 1.23.92.1 07-Jan-2011  matt Deal with new powerpc world.
 1.23.88.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.23.68.2 11-Aug-2010  yamt sync with head.
 1.23.68.1 11-Mar-2010  yamt sync with head
 1.24.2.1 30-May-2010  rmind sync with head
 1.25.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.27.4.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.27.4.1 22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.28.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 18-Mar-2010  kiyohara Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.1 13-Aug-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6; 1.1.118; 1.1.138; 1.1.140;
Split out device register definitions to their own files as the are
common across many of the 4xx parts. Leaves ibm405gp.h with device
address information specific to the 405GP CPU. Now allows opb.c to
support multiple 4xx CPU types.
 1.1.140.1 30-May-2010  rmind sync with head
 1.1.138.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.118.1 11-Aug-2010  yamt sync with head.
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 13-Aug-2002  jdolecek file opbreg.h was added on branch kqueue on 2002-09-06 08:39:09 +0000
 1.1.4.2 31-Aug-2002  gehenna catch up with -current.
 1.1.4.1 13-Aug-2002  gehenna file opbreg.h was added on branch gehenna-devsw on 2002-08-31 13:45:45 +0000
 1.1.2.2 27-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 13-Aug-2002  nathanw file opbreg.h was added on branch nathanw_sa on 2002-08-27 23:45:12 +0000
 1.6 18-Jun-2011  matt Use <sys/foo.h> instead of <machine/foo.h> if such a file exists.
Don't assume <sys/cpu.h> includes <powerpc/subarch/cpu*.h>. Include it
explicitly.
 1.5 18-Mar-2010  kiyohara branches: 1.5.6;
Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.4 21-Feb-2006  thorpej branches: 1.4.72; 1.4.92; 1.4.94;
Add an "instance" member to opb_attach_args and use it when fetching
the mac-address property from board_info. port-powerpc/32862
 1.3 11-Dec-2005  christos branches: 1.3.2; 1.3.4; 1.3.6;
merge ktrace-lwp.
 1.2 25-Jul-2003  scw branches: 1.2.16;
Switch ibm4xx over to using the more flexible powerpc bus_space/bus_dma code.
 1.1 12-Aug-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6; 1.1.12;
Reorganise the IBM 4xx bus layout, using terminology from the IBM
documentation:
- Remove "mainbus" altogether.
- The new root is "plb" - the Processor Local Bus.
- Attached to this is the "opb" - the On-chip Peripheral Bus, to which
all the on-chip devices are attached (except the cpu and pci host
bridge).
- Port-specific code can pass an array of 'struct plb_dev' to
config_rootfound() to attach extra devices to the plb. The walnut
port attaches a "pbus" (Peripheral Bus) in here for the RTC and
pc keyboard controller to attach to.
There is still much 405GP specific code; the next round of changes will
generalise this to enable easier support for other 4xx CPUs.
 1.1.12.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.12.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.12.1 03-Aug-2004  skrll Sync with HEAD
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 12-Aug-2002  jdolecek file opbvar.h was added on branch kqueue on 2002-09-06 08:39:09 +0000
 1.1.4.2 31-Aug-2002  gehenna catch up with -current.
 1.1.4.1 12-Aug-2002  gehenna file opbvar.h was added on branch gehenna-devsw on 2002-08-31 13:45:45 +0000
 1.1.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 12-Aug-2002  nathanw file opbvar.h was added on branch nathanw_sa on 2002-08-13 02:18:43 +0000
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.3.6.1 22-Apr-2006  simonb Sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.3.2.1 01-Mar-2006  yamt sync with head.
 1.4.94.1 30-May-2010  rmind sync with head
 1.4.92.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.4.72.1 11-Aug-2010  yamt sync with head.
 1.5.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2 24-Jun-2023  msaitoh Fix typo in comment.
 1.1 13-Aug-2002  simonb branches: 1.1.2; 1.1.4; 1.1.6;
Split out device register definitions to their own files as the are
common across many of the 4xx parts. Leaves ibm405gp.h with device
address information specific to the 405GP CPU. Now allows opb.c to
support multiple 4xx CPU types.
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 13-Aug-2002  jdolecek file pcicreg.h was added on branch kqueue on 2002-09-06 08:39:10 +0000
 1.1.4.2 31-Aug-2002  gehenna catch up with -current.
 1.1.4.1 13-Aug-2002  gehenna file pcicreg.h was added on branch gehenna-devsw on 2002-08-31 13:45:45 +0000
 1.1.2.2 27-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 13-Aug-2002  nathanw file pcicreg.h was added on branch nathanw_sa on 2002-08-27 23:45:13 +0000
 1.25 20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.24 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.23 24-Apr-2021  thorpej branches: 1.23.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.22 06-Jul-2020  rin branches: 1.22.4;
Style and cosmetic changes. No binary changes intended.
 1.21 21-Nov-2013  kiyohara Support Synopsys DesigneWave OTG on PowerPC 405EX.
 1.20 18-Jun-2011  matt branches: 1.20.2; 1.20.12; 1.20.16;
Use <sys/foo.h> instead of <machine/foo.h> if such a file exists.
Don't assume <sys/cpu.h> includes <powerpc/subarch/cpu*.h>. Include it
explicitly.
 1.19 06-Jun-2011  matt More device_t, cfdata, CFATTACH_DECL_NEW cleanup.
 1.18 13-Dec-2010  kiyohara branches: 1.18.6;
Fix PR#43911.
 1.17 09-Nov-2010  uebayasi Whitespace.
 1.16 06-Nov-2010  uebayasi Add IBM405GPr "External Bus" driver.
 1.15 18-Mar-2010  kiyohara Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.14 11-Dec-2005  christos branches: 1.14.78; 1.14.98; 1.14.100;
merge ktrace-lwp.
 1.13 28-Jun-2005  drochner 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.12 13-Feb-2004  wiz Uppercase CPU, plural is CPUs.
 1.11 25-Jul-2003  scw Fix the default bus dma tag.
 1.10 25-Jul-2003  scw Switch ibm4xx over to using the more flexible powerpc bus_space/bus_dma code.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 01-Jan-2003  thorpej branches: 1.8.2;
Use aprint_normal() for cfprint routines.
 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 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.3 23-Aug-2002  scw branches: 1.3.2; 1.3.4;
Add "ecc at plb" device.
Add an "irq" locator to the plb device.
This gets rid of the original hack where ecc support was wedged into
the cpu driver.
 1.2 13-Aug-2002  simonb Use "ibm4xx" instead of "galaxy"; galaxy was an early code name for the
405GP.
 1.1 12-Aug-2002  simonb branches: 1.1.2;
Reorganise the IBM 4xx bus layout, using terminology from the IBM
documentation:
- Remove "mainbus" altogether.
- The new root is "plb" - the Processor Local Bus.
- Attached to this is the "opb" - the On-chip Peripheral Bus, to which
all the on-chip devices are attached (except the cpu and pci host
bridge).
- Port-specific code can pass an array of 'struct plb_dev' to
config_rootfound() to attach extra devices to the plb. The walnut
port attaches a "pbus" (Peripheral Bus) in here for the RTC and
pc keyboard controller to attach to.
There is still much 405GP specific code; the next round of changes will
generalise this to enable easier support for other 4xx CPUs.
 1.1.2.5 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.3 27-Aug-2002  nathanw Catch up to -current.
 1.1.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 12-Aug-2002  nathanw file plb.c was added on branch nathanw_sa on 2002-08-13 02:18:44 +0000
 1.3.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.4.1 23-Aug-2002  jdolecek file plb.c was added on branch kqueue on 2002-09-06 08:39:10 +0000
 1.3.2.2 31-Aug-2002  gehenna catch up with -current.
 1.3.2.1 23-Aug-2002  gehenna file plb.c was added on branch gehenna-devsw on 2002-08-31 13:45:45 +0000
 1.8.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.100.3 12-Jun-2011  rmind sync with head
 1.14.100.2 05-Mar-2011  rmind sync with head
 1.14.100.1 30-May-2010  rmind sync with head
 1.14.98.4 09-Nov-2010  uebayasi Sync with HEAD.
 1.14.98.3 09-Nov-2010  uebayasi Sync with HEAD.
 1.14.98.2 11-Aug-2010  uebayasi Implement 405GPr's "External Bus" as exb(4).
 1.14.98.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.14.78.1 11-Aug-2010  yamt sync with head.
 1.18.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.20.16.1 18-May-2014  rmind sync with head
 1.20.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.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.22.4.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.23.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.7 21-Nov-2013  kiyohara Support Synopsys DesigneWave OTG on PowerPC 405EX.
 1.6 18-Jun-2011  matt branches: 1.6.2; 1.6.12; 1.6.16;
Use <sys/foo.h> instead of <machine/foo.h> if such a file exists.
Don't assume <sys/cpu.h> includes <powerpc/subarch/cpu*.h>. Include it
explicitly.
 1.5 18-Mar-2010  kiyohara branches: 1.5.6;
Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.4 11-Dec-2005  christos branches: 1.4.78; 1.4.98; 1.4.100;
merge ktrace-lwp.
 1.3 25-Jul-2003  scw Switch ibm4xx over to using the more flexible powerpc bus_space/bus_dma code.
 1.2 23-Aug-2002  scw branches: 1.2.2; 1.2.4; 1.2.10;
Add "ecc at plb" device.
Add an "irq" locator to the plb device.
This gets rid of the original hack where ecc support was wedged into
the cpu driver.
 1.1 12-Aug-2002  simonb branches: 1.1.2;
Reorganise the IBM 4xx bus layout, using terminology from the IBM
documentation:
- Remove "mainbus" altogether.
- The new root is "plb" - the Processor Local Bus.
- Attached to this is the "opb" - the On-chip Peripheral Bus, to which
all the on-chip devices are attached (except the cpu and pci host
bridge).
- Port-specific code can pass an array of 'struct plb_dev' to
config_rootfound() to attach extra devices to the plb. The walnut
port attaches a "pbus" (Peripheral Bus) in here for the RTC and
pc keyboard controller to attach to.
There is still much 405GP specific code; the next round of changes will
generalise this to enable easier support for other 4xx CPUs.
 1.1.2.3 27-Aug-2002  nathanw Catch up to -current.
 1.1.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 12-Aug-2002  nathanw file plbvar.h was added on branch nathanw_sa on 2002-08-13 02:18:44 +0000
 1.2.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.10.1 03-Aug-2004  skrll Sync with HEAD
 1.2.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.1 23-Aug-2002  jdolecek file plbvar.h was added on branch kqueue on 2002-09-06 08:39:11 +0000
 1.2.2.2 31-Aug-2002  gehenna catch up with -current.
 1.2.2.1 23-Aug-2002  gehenna file plbvar.h was added on branch gehenna-devsw on 2002-08-31 13:45:45 +0000
 1.4.100.1 30-May-2010  rmind sync with head
 1.4.98.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.4.78.1 11-Aug-2010  yamt sync with head.
 1.5.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 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.2 06-Jul-2020  rin Style and cosmetic changes. No binary changes intended.
 1.1 18-Mar-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.6;
Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 18-Mar-2010  yamt file rgmii.c was added on branch yamt-nfs-mp on 2010-08-11 22:52:33 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 18-Mar-2010  rmind file rgmii.c was added on branch rmind-uvmplock on 2010-05-30 05:17:02 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 18-Mar-2010  uebayasi file rgmii.c was added on branch uebayasi-xip on 2010-04-30 14:39:42 +0000
 1.1 18-Mar-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.6;
Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 18-Mar-2010  yamt file rgmiireg.h was added on branch yamt-nfs-mp on 2010-08-11 22:52:33 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 18-Mar-2010  rmind file rgmiireg.h was added on branch rmind-uvmplock on 2010-05-30 05:17:02 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 18-Mar-2010  uebayasi file rgmiireg.h was added on branch uebayasi-xip on 2010-04-30 14:39:42 +0000
 1.1 18-Mar-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.6;
Support PowerPC 405EX/EXr.
1. Add some new source and header files.
(MAL(split) and RGMII(new) relations for EMAC)
2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h.
3. intr.c supports MULTIUIC with virtual-irq. likes to oea.
support 32-virq/128-hwirq.
4. multiple emac support.
5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 18-Mar-2010  yamt file rmiivar.h was added on branch yamt-nfs-mp on 2010-08-11 22:52:33 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 18-Mar-2010  rmind file rmiivar.h was added on branch rmind-uvmplock on 2010-05-30 05:17:02 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 18-Mar-2010  uebayasi file rmiivar.h was added on branch uebayasi-xip on 2010-04-30 14:39:42 +0000
 1.5 18-Sep-2006  gdamore Conversion of evbppc to generic TODR. ok freza@
 1.4 11-Dec-2005  christos branches: 1.4.20; 1.4.22;
merge ktrace-lwp.
 1.3 04-Jun-2005  he branches: 1.3.2;
Fix the various todr_gettime() and todr_settime() fallouts from
-Wcast-qual differently, by instead changing the signatore of those
"functions" to take a "volatile struct timeval*" instead of a
"struct timeval*". Many places, these functions are called with
&time, and time is declared as volatile in <sys/kernel.h>. This
way we can get rid of all the ugly casts which now also triggered
warnings, and caused more code to be added to work around the
problem.

Reviewed by thorpej.
 1.2 03-Jun-2005  scw Appease -Wcast-qual
 1.1 06-Oct-2003  shige branches: 1.1.4;
Add Real time clock support code.
 1.1.4.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 06-Oct-2003  skrll file rtc.c was added on branch ktrace-lwp on 2004-08-03 10:39:28 +0000
 1.3.2.1 30-Dec-2006  yamt sync with head.
 1.4.22.1 22-Oct-2006  yamt sync with head
 1.4.20.1 18-Nov-2006  ad Sync with head.
 1.4 17-Sep-2006  gdamore Remove unused todclock files -- these are left overs from pre-generic-TODR.
 1.3 11-Dec-2005  christos branches: 1.3.20;
merge ktrace-lwp.
 1.2 05-Jul-2004  pk branches: 1.2.2; 1.2.14;
Call inittodr() from main(). Let file system code set the recorded `last
update' time (if any) through the new function setrootfstime().
 1.1 23-Sep-2003  shige Move todclock driver from evbppc/walnut/dev.
 1.2.14.1 30-Dec-2006  yamt sync with head.
 1.2.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.2 03-Aug-2004  skrll Sync with HEAD
 1.2.2.1 05-Jul-2004  skrll file todclock.c was added on branch ktrace-lwp on 2004-08-03 10:39:28 +0000
 1.3.20.1 18-Nov-2006  ad Sync with head.
 1.3 17-Sep-2006  gdamore Remove unused todclock files -- these are left overs from pre-generic-TODR.
 1.2 11-Dec-2005  christos branches: 1.2.20;
merge ktrace-lwp.
 1.1 23-Sep-2003  shige branches: 1.1.4; 1.1.18;
Move todclock driver from evbppc/walnut/dev.
 1.1.18.1 30-Dec-2006  yamt sync with head.
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 23-Sep-2003  skrll file todclockvar.h was added on branch ktrace-lwp on 2004-08-03 10:39:28 +0000
 1.2.20.1 18-Nov-2006  ad Sync with head.
 1.12 18-Jun-2011  matt Use aprint_normal include sys/cpu.h
 1.11 17-Jun-2011  matt struct device * -> device_t
struct cfdata * -> cfdata_t
split device/softc (CFATTACH_DECL_NEW)
use device_accessors and device_private
constify
 1.10 25-Feb-2010  matt branches: 1.10.8;
Adapt to spr.h breakup.
 1.9 05-May-2006  thorpej branches: 1.9.66; 1.9.86; 1.9.90;
Remove the devprop API and switch everthing over to the new proplib. Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.6; 1.8.8; 1.8.10; 1.8.12;
merge ktrace-lwp.
 1.7 15-Jul-2003  lukem branches: 1.7.16;
__KERNEL_RCSID()
 1.6 02-Oct-2002  thorpej branches: 1.6.6;
Add trailing ; to CFATTACH_DECL.
 1.5 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.4 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.3 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.2 12-Aug-2002  simonb branches: 1.2.2; 1.2.4;
Reorganise the IBM 4xx bus layout, using terminology from the IBM
documentation:
- Remove "mainbus" altogether.
- The new root is "plb" - the Processor Local Bus.
- Attached to this is the "opb" - the On-chip Peripheral Bus, to which
all the on-chip devices are attached (except the cpu and pci host
bridge).
- Port-specific code can pass an array of 'struct plb_dev' to
config_rootfound() to attach extra devices to the plb. The walnut
port attaches a "pbus" (Peripheral Bus) in here for the RTC and
pc keyboard controller to attach to.
There is still much 405GP specific code; the next round of changes will
generalise this to enable easier support for other 4xx CPUs.
 1.1 01-Aug-2002  simonb branches: 1.1.2;
Add driver for 405gp (and other 4xx?) watchdog timer.
 1.1.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.3 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.2 06-Aug-2002  nathanw Catch up with powerpc rototilling.
 1.1.2.1 01-Aug-2002  nathanw file wdog.c was added on branch nathanw_sa on 2002-08-06 22:47:09 +0000
 1.2.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.1 12-Aug-2002  jdolecek file wdog.c was added on branch kqueue on 2002-09-06 08:39:12 +0000
 1.2.2.2 31-Aug-2002  gehenna catch up with -current.
 1.2.2.1 12-Aug-2002  gehenna file wdog.c was added on branch gehenna-devsw on 2002-08-31 13:45:45 +0000
 1.6.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.6.1 03-Aug-2004  skrll Sync with HEAD
 1.7.16.1 21-Jun-2006  yamt sync with head.
 1.8.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.8.10.1 11-May-2006  elad sync with head
 1.8.8.1 24-May-2006  yamt sync with head.
 1.8.6.1 01-Jun-2006  kardel Sync with head.
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.9.90.1 07-Jan-2011  matt Deal with new powerpc world.
 1.9.86.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.9.66.1 11-Mar-2010  yamt sync with head
 1.10.8.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.1 20-Mar-2010  kiyohara branches: 1.1.2; 1.1.4; 1.1.6;
Fix build failed.
Add forgot zmiireg.h since support 405EX.
 1.1.6.2 11-Aug-2010  yamt sync with head.
 1.1.6.1 20-Mar-2010  yamt file zmiireg.h was added on branch yamt-nfs-mp on 2010-08-11 22:52:33 +0000
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 20-Mar-2010  rmind file zmiireg.h was added on branch rmind-uvmplock on 2010-05-30 05:17:02 +0000
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 20-Mar-2010  uebayasi file zmiireg.h was added on branch uebayasi-xip on 2010-04-30 14:39:42 +0000

RSS XML Feed