Home | History | Annotate | only in /src/sys/arch/arm/s3c2xx0
History log of /src/sys/arch/arm/s3c2xx0
RevisionDateAuthorComments
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 14-Feb-2004  bsh branches: 1.4.4;
add lcd and spi
 1.3 29-Aug-2003  bsh support EXTINT[4:23] as interrupt sources. They are cascaded to
IRQ4 (EXTINT[4:7]) and 5 (EXTINT[8:23]). ssextio driver handles these interrupts.
 1.2 05-Aug-2003  bsh support S3C2410's built-in USB host controller, which is OHCI
compliant.
 1.1 31-Jul-2003  bsh the first cut of Samsung S3C2410 support.
It is Samsung's another ARM920 based SoC.

XXX: not tested much yet.
 1.4.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.4.4.2 03-Aug-2004  skrll Sync with HEAD
 1.4.4.1 14-Feb-2004  skrll file files.s3c2410 was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.2 07-Feb-2012  nisimura branches: 1.2.4; 1.2.6;

- add MBR editing menu to sysinst.
- fix typos in timecounter names.
- make sure to drain Tx FIFO to avoid clobbering
kernel boot messages.
- allow to have the 3rd UART.
- add missing time-of-day clock support.

Ok by releng.
 1.1 30-Jan-2012  nisimura Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.2.6.2 17-Apr-2012  yamt sync with head
 1.2.6.1 07-Feb-2012  yamt file files.s3c2440 was added on branch yamt-pagecache on 2012-04-17 00:06:06 +0000
 1.2.4.2 18-Feb-2012  mrg merge to -current.
 1.2.4.1 07-Feb-2012  mrg file files.s3c2440 was added on branch jmcneill-usbmp on 2012-02-18 07:31:29 +0000
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file files.s3c2800 was added on branch nathanw_sa on 2002-12-11 05:53:12 +0000
 1.8 03-Dec-2007  ad Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.7 11-Dec-2005  christos branches: 1.7.30; 1.7.46; 1.7.48; 1.7.50; 1.7.52; 1.7.58;
merge ktrace-lwp.
 1.6 05-Aug-2003  bsh branches: 1.6.16;
add s3c2xx0_busdma.c which is used to initialize bus dma tag.
 1.5 04-Aug-2003  bsh Samsung's S3C2800 and S3C24[10]0 CPUs have same built-in UART block,
but there are very small diffs in register definitions. For that, add
new options SSCOM_S3C{2800,2410,2400} and include appropriate
s3c*reg.h.

SSCOM_S3C2410 is also needed for interrupt controller differences.
 1.4 31-Jul-2003  bsh add SSCOM_S3C2410 option.
 1.3 13-May-2003  bsh branches: 1.3.2;
add an option to set external X'tal frequency.
 1.2 02-Jan-2003  thorpej Clean up evbarm interrupt support a little:
* Define an ARM_INTR_IMPL option, which specifies a header file
describing the interrupt implementation for the platform. Use
this instead of the list of EVBARM_BOARDTYPE checks.
* Make the s3c2xx0 interrupt dispatch code a bit more generic, and move
it to a generic location so that other platforms can use it.

This eliminates all uses of the EVBARM_BOARDTYPE stuff, so delete it.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file files.s3c2xx0 was added on branch nathanw_sa on 2002-12-11 05:53:13 +0000
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.16.1 07-Dec-2007  yamt sync with head
 1.7.58.1 08-Dec-2007  mjf Sync with HEAD.
 1.7.52.1 09-Jan-2008  matt sync with HEAD
 1.7.50.1 01-Jan-2008  chris Sync with HEAD.
 1.7.48.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.7.46.1 26-Dec-2007  rjs Sync with HEAD.
 1.7.30.1 03-Dec-2007  ad Sync with HEAD.
 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 09-Apr-2018  jakllsch branches: 1.10.16;
Stop potential misuse of vendor names and USB vendor IDs in root hub
device and string descriptors.

Firstly: Few vendors have identical PCI-SIG vendor IDs and USB-IF vendor
IDs. As such, using the PCI vendor ID as a USB vendor ID may trample
on whomever is allocated that USB vendor ID.

Secondly: The vendor of the host controller hardware implementation has
little to nothing to do with our usbroothub implementation. Thus we
should not potentially associate any problems therewith to such third
party.

This change will result in root hubs being identified by USB Vendor ID
0x0000. Root hub vendor string will now be "NetBSD" (or, specifically:
ostype). Product ID (0x0000) and product strings remain unchanged.
 1.9 23-Apr-2016  skrll branches: 1.9.16;
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.8 01-Jul-2011  dyoung branches: 1.8.12; 1.8.28; 1.8.30; 1.8.34;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.7 11-Nov-2010  dyoung Fix usb_port.h-removal fallout with the patch by Brett Slager in
port-arm/44081, "evbarm/SMDK2410 kernel fails to compile".

Use device_t instead of device_ptr_t. Use device_t and cfdata_t
typedefs. Insert missing aprint_naive().
 1.6 28-Apr-2008  martin branches: 1.6.22;
Remove clause 3 and 4 from TNF licenses
 1.5 26-Apr-2008  drochner branches: 1.5.2;
try to update for OHCI device/softc split, untested
(I've asked for testing on Apr 3, w/o success.)
 1.4 31-Mar-2008  dogcow branches: 1.4.2;
fix device_t split fallout.
 1.3 11-Dec-2005  christos branches: 1.3.76;
merge ktrace-lwp.
 1.2 29-Aug-2003  bsh branches: 1.2.4;
+ set vendor name as Samsung.
+ delete debug printf() and use aprint_normal()
 1.1 05-Aug-2003  bsh support S3C2410's built-in USB host controller, which is OHCI
compliant.
 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 29-Aug-2003  skrll file ohci_s3c24x0.c was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.3.76.2 02-Jun-2008  mjf Sync with HEAD.
 1.3.76.1 03-Apr-2008  mjf Sync with HEAD.
 1.4.2.1 18-May-2008  yamt sync with head.
 1.5.2.1 16-May-2008  yamt sync with head.
 1.6.22.1 05-Mar-2011  rmind sync with head
 1.8.34.1 06-Sep-2016  skrll First pass at netbsd-7 updated with USB code from HEAD
 1.8.30.4 05-Dec-2014  skrll Use int for return type for [eou]chi_init and motg_init.
 1.8.30.3 05-Dec-2014  skrll KNF. Remove ( ) from return statements.
 1.8.30.2 03-Dec-2014  skrll The grand renaming of structure members.

No functional change.
 1.8.30.1 03-Dec-2014  skrll Trailing whitespace.
 1.8.28.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.8.12.1 03-Dec-2017  jdolecek update from HEAD
 1.9.16.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.10.16.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.11.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 12-Feb-2004  bsh branches: 1.3.4;
be consistent with #define<TAB>
 1.2 27-Aug-2003  bsh move some definitions of register block size from s3c24[10]0reg.h
to s3c24x0reg.h when they are same for S3C2410 and 2400, and rename them as
S3C24X0_FOO_SIZE.
 1.1 31-Jul-2003  bsh the first cut of Samsung S3C2410 support.
It is Samsung's another ARM920 based SoC.

XXX: not tested much yet.
 1.3.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.3.4.2 03-Aug-2004  skrll Sync with HEAD
 1.3.4.1 12-Feb-2004  skrll file s3c2400reg.h was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.15 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.14 24-Apr-2021  thorpej branches: 1.14.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.13 27-Oct-2012  chs branches: 1.13.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.12 30-Jan-2012  nisimura branches: 1.12.6;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.11 01-Jul-2011  dyoung branches: 1.11.2; 1.11.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.10 11-Dec-2005  christos merge ktrace-lwp.
 1.9 26-Aug-2005  drochner s/locdesc_t/int/g
 1.8 30-Jun-2005  drochner branches: 1.8.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.7 16-Mar-2005  bsh Switch SMDK2410 and SMDK2800 kernels to use pmap_devmap_bootstrap() to map
I/O registers that are used in early start-up stage. This replaces the
special bootstrap-time-only bus_space_map function in smdk{2410,2800}_machdep.c.

This makes SMDK{2410,2800}'s initarm() a bit simpler, and gives us smaller diffs
to other evbarm platforms.

An another good thing for SMDK2800 is that now we have all built-in peripheral
registers mapped in 2 segments. We may expect less TLB miss on I/O access
(very slightly).
 1.6 13-Mar-2005  bsh change a printf to aprint_normal.
 1.5 22-Jun-2004  bsh branches: 1.5.2; 1.5.6; 1.5.8;
Implement software reset by means of watchdog timer.
 1.4 27-Aug-2003  bsh move some definitions of register block size from s3c24[10]0reg.h
to s3c24x0reg.h when they are same for S3C2410 and 2400, and rename them as
S3C24X0_FOO_SIZE.
 1.3 05-Aug-2003  bsh add busdma tag to s3c2xx0_softc and attach arg.

initialize busdma tag in s3c2410_attach()
 1.2 04-Aug-2003  bsh + cleanup attach message.
+ use aprint_normal()
 1.1 31-Jul-2003  bsh the first cut of Samsung S3C2410 support.
It is Samsung's another ARM920 based SoC.

XXX: not tested much yet.
 1.5.8.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.5.6.1 29-Apr-2005  kent sync with -current
 1.5.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.5.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.5.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.2 03-Aug-2004  skrll Sync with HEAD
 1.5.2.1 22-Jun-2004  skrll file s3c2410.c was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.8.2.1 21-Jun-2006  yamt sync with head.
 1.11.6.1 18-Feb-2012  mrg merge to -current.
 1.11.2.2 30-Oct-2012  yamt sync with head
 1.11.2.1 17-Apr-2012  yamt sync with head
 1.12.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.52.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.13.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.13.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.13.52.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.13.52.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.14.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.16 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.15 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.14 24-Apr-2021  thorpej branches: 1.14.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.13 27-Oct-2012  chs branches: 1.13.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.12 30-Jan-2012  nisimura branches: 1.12.6;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.11 01-Jul-2011  dyoung branches: 1.11.2; 1.11.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.10 05-Jan-2010  mbalmer One semicolon is enough.
 1.9 06-Jan-2008  matt branches: 1.9.10;
Cleanup softint lossage.
 1.8 15-Dec-2007  perry __FUNCTION__ -> __func__
 1.7 23-Feb-2006  thorpej branches: 1.7.40; 1.7.44; 1.7.46; 1.7.52; 1.7.56; 1.7.60;
Use device_parent().
 1.6 24-Dec-2005  perry branches: 1.6.2; 1.6.4; 1.6.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 26-Aug-2005  drochner s/locdesc_t/int/g
 1.3 30-Jun-2005  drochner branches: 1.3.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.2 24-Sep-2003  mycroft branches: 1.2.4;
Fix GCC 3 barfage.
 1.1 29-Aug-2003  bsh support EXTINT[4:23] as interrupt sources. They are cascaded to
IRQ4 (EXTINT[4:7]) and 5 (EXTINT[8:23]). ssextio driver handles these interrupts.
 1.2.4.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 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 24-Sep-2003  skrll file s3c2410_extint.c was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.3.2.2 21-Jan-2008  yamt sync with head
 1.3.2.1 21-Jun-2006  yamt sync with head.
 1.6.6.1 22-Apr-2006  simonb Sync with head.
 1.6.4.1 09-Sep-2006  rpaulo sync with head
 1.6.2.1 01-Mar-2006  yamt sync with head.
 1.7.60.2 08-Jan-2008  bouyer Sync with HEAD
 1.7.60.1 02-Jan-2008  bouyer Sync with HEAD
 1.7.56.1 26-Dec-2007  ad Sync with head.
 1.7.52.1 18-Feb-2008  mjf Sync with HEAD.
 1.7.46.1 09-Jan-2008  matt sync with HEAD
 1.7.44.2 20-Jan-2008  chris Sync to HEAD.
 1.7.44.1 01-Jan-2008  chris Sync with HEAD.
 1.7.40.2 28-Feb-2008  rjs Sync with HEAD.
 1.7.40.1 26-Dec-2007  rjs Sync with HEAD.
 1.9.10.1 11-Mar-2010  yamt sync with head
 1.11.6.1 18-Feb-2012  mrg merge to -current.
 1.11.2.2 30-Oct-2012  yamt sync with head
 1.11.2.1 17-Apr-2012  yamt sync with head
 1.12.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.13.52.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.13.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.13.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.13.52.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.13.52.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.14.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.14 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.13 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.12 20-Dec-2010  matt Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.11 24-Nov-2008  dogcow branches: 1.11.8;
add closing paren. (HI MATT!)
 1.10 19-Nov-2008  matt Don't use atomic_{set,clear}_bit nor any atomic op. These used to wrap
atomic_{clear,set}_bit around munging a device register and that is clearly
wrong. Instead directly manipulate the CPSR to disable interrupts.
 1.9 27-Apr-2008  matt branches: 1.9.6; 1.9.8;
Merge kernel changes in matt-armv6 to HEAD.
 1.8 06-Jan-2008  matt branches: 1.8.6; 1.8.8; 1.8.10;
Truly kill current_intr_depth once and for all.
 1.7 06-Jan-2008  matt Cleanup softint lossage.
 1.6 24-Dec-2005  perry branches: 1.6.36; 1.6.46; 1.6.50; 1.6.52; 1.6.58; 1.6.66;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 04-Jun-2005  he branches: 1.4.2;
Add use of an __UNVOLATILE() to appease -Wcast-qual.
May be revisited if atomic_set_bit()'s signature can change.
 1.3 29-Aug-2003  bsh branches: 1.3.4;
support EXTINT[4:23] as interrupt sources. They are cascaded to
IRQ4 (EXTINT[4:7]) and 5 (EXTINT[8:23]). ssextio driver handles these interrupts.
 1.2 04-Aug-2003  bsh various bug fixes. Now SMDK2410 evboard boots up to single user mode
using install ramdisk.
 1.1 31-Jul-2003  bsh the first cut of Samsung S3C2410 support.
It is Samsung's another ARM920 based SoC.

XXX: not tested much yet.
 1.3.4.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.3.4.2 03-Aug-2004  skrll Sync with HEAD
 1.3.4.1 29-Aug-2003  skrll file s3c2410_intr.c was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.4.2.2 21-Jan-2008  yamt sync with head
 1.4.2.1 21-Jun-2006  yamt sync with head.
 1.6.66.1 08-Jan-2008  bouyer Sync with HEAD
 1.6.58.1 18-Feb-2008  mjf Sync with HEAD.
 1.6.52.2 28-Jan-2008  matt Given the that there are only 4 IPLs (ignoring soft IPLs), a number of
cleanups can be done:
Remove _SPL_* aliases.
Don't store irqmasks in ci_cpl, just make it an ipl level.
Add fast softint switching support.
 1.6.52.1 09-Jan-2008  matt sync with HEAD
 1.6.50.1 20-Jan-2008  chris Sync to HEAD.
 1.6.46.1 28-Feb-2008  rjs Sync with HEAD.
 1.6.36.1 19-Apr-2007  thorpej Convert to the new atomic ops API.
 1.8.10.2 04-May-2009  yamt sync with head.
 1.8.10.1 16-May-2008  yamt sync with head.
 1.8.8.1 18-May-2008  yamt sync with head.
 1.8.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.8.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.9.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.11.8.1 05-Mar-2011  rmind sync with head
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 31-Jul-2003  bsh branches: 1.1.4;
the first cut of Samsung S3C2410 support.
It is Samsung's another ARM920 based SoC.

XXX: not tested much yet.
 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 31-Jul-2003  skrll file s3c2410_intr.h was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.10 21-Feb-2025  andvar s/dirver/driver/ in comments.
 1.9 07-Aug-2021  thorpej branches: 1.9.12;
Merge thorpej-cfargs2.
 1.8 24-Apr-2021  thorpej branches: 1.8.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.7 27-Oct-2012  chs branches: 1.7.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.6 01-Jul-2011  dyoung branches: 1.6.2; 1.6.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.5 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.4 11-Dec-2005  christos branches: 1.4.80; 1.4.88; 1.4.94;
merge ktrace-lwp.
 1.3 26-Aug-2005  drochner s/locdesc_t/int/g
 1.2 30-Jun-2005  drochner branches: 1.2.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.1 14-Feb-2004  bsh branches: 1.1.4;
SPI support for Samsung S3C2410.

spi driver doesn't provide any actual I/O, and attaches child drivers
for devices that hooked to SPI ports.
 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 14-Feb-2004  skrll file s3c2410_spi.c was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.2.2.1 21-Jun-2006  yamt sync with head.
 1.4.94.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.4.88.1 28-Apr-2009  skrll Sync with HEAD.
 1.4.80.1 04-May-2009  yamt sync with head.
 1.6.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.2.1 30-Oct-2012  yamt sync with head
 1.7.52.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.7.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.7.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.7.52.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.7.52.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.8.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.9.12.1 02-Aug-2025  perseant Sync with HEAD
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 12-Feb-2004  bsh branches: 1.6.4;
add register definitions for LCD controller, AD converter, and SPI.
 1.5 12-Feb-2004  bsh be consistent with #define<TAB>
 1.4 03-Sep-2003  mycroft Add some register definitions.
 1.3 27-Aug-2003  bsh move some definitions of register block size from s3c24[10]0reg.h
to s3c24x0reg.h when they are same for S3C2410 and 2400, and rename them as
S3C24X0_FOO_SIZE.
 1.2 04-Aug-2003  bsh fix comments.
 1.1 31-Jul-2003  bsh the first cut of Samsung S3C2410 support.
It is Samsung's another ARM920 based SoC.

XXX: not tested much yet.
 1.6.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.6.4.2 03-Aug-2004  skrll Sync with HEAD
 1.6.4.1 12-Feb-2004  skrll file s3c2410reg.h was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 29-Aug-2003  bsh branches: 1.2.4;
support EXTINT[4:23] as interrupt sources. They are cascaded to
IRQ4 (EXTINT[4:7]) and 5 (EXTINT[8:23]). ssextio driver handles these interrupts.
 1.1 31-Jul-2003  bsh the first cut of Samsung S3C2410 support.
It is Samsung's another ARM920 based SoC.

XXX: not tested much yet.
 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 29-Aug-2003  skrll file s3c2410var.h was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.4 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.3 24-Apr-2021  thorpej branches: 1.3.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.2 27-Oct-2012  chs branches: 1.2.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.1 30-Jan-2012  nisimura branches: 1.1.4; 1.1.6; 1.1.10;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.1.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.6.3 30-Oct-2012  yamt sync with head
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 30-Jan-2012  yamt file s3c2440.c was added on branch yamt-pagecache on 2012-04-17 00:06:06 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 30-Jan-2012  mrg file s3c2440.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:29 +0000
 1.2.52.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.2.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.2.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.2.52.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.2.52.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.3.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.4 10-Nov-2019  chs branches: 1.4.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.3 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.2 12-Nov-2012  skrll branches: 1.2.36; 1.2.38;
C99 types
 1.1 30-Jan-2012  nisimura branches: 1.1.4; 1.1.6; 1.1.10;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.1.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.6.3 16-Jan-2013  yamt sync with (a bit old) head
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 30-Jan-2012  yamt file s3c2440_dma.c was added on branch yamt-pagecache on 2012-04-17 00:06:06 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 30-Jan-2012  mrg file s3c2440_dma.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:30 +0000
 1.2.38.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.38.1 10-Jun-2019  christos Sync with HEAD
 1.2.36.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.4.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.2 10-Nov-2019  chs in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.1 30-Jan-2012  nisimura branches: 1.1.4; 1.1.6; 1.1.52;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.1.52.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 30-Jan-2012  yamt file s3c2440_dma.h was added on branch yamt-pagecache on 2012-04-17 00:06:06 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 30-Jan-2012  mrg file s3c2440_dma.h was added on branch jmcneill-usbmp on 2012-02-18 07:31:30 +0000
 1.6 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 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 14-May-2020  msaitoh branches: 1.3.4;
Remove extra semicolon.
 1.2 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.1 30-Jan-2012  nisimura branches: 1.1.4; 1.1.6; 1.1.10;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.1.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.6.3 30-Oct-2012  yamt sync with head
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 30-Jan-2012  yamt file s3c2440_extint.c was added on branch yamt-pagecache on 2012-04-17 00:06:06 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 30-Jan-2012  mrg file s3c2440_extint.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:30 +0000
 1.3.4.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.3.4.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.3.4.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.3.4.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.3.4.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.4.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.8 06-May-2023  andvar few more typos in the word "register", mainly s/resister/register/.
In one comment I assume that it was meant to be pull-up resistor.
 1.7 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.6 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.5 24-Apr-2021  thorpej branches: 1.5.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.4 10-Nov-2019  chs branches: 1.4.10;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.3 28-Oct-2012  msaitoh branches: 1.3.38;
Fix compile error.
 1.2 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.1 30-Jan-2012  nisimura branches: 1.1.4; 1.1.6; 1.1.10;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.1.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.6.3 30-Oct-2012  yamt sync with head
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 30-Jan-2012  yamt file s3c2440_i2s.c was added on branch yamt-pagecache on 2012-04-17 00:06:06 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 30-Jan-2012  mrg file s3c2440_i2s.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:30 +0000
 1.3.38.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.10.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.4.10.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.4.10.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.4.10.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.4.10.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.5.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.1 30-Jan-2012  nisimura branches: 1.1.4; 1.1.6;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 30-Jan-2012  yamt file s3c2440_i2s.h was added on branch yamt-pagecache on 2012-04-17 00:06:06 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 30-Jan-2012  mrg file s3c2440_i2s.h was added on branch jmcneill-usbmp on 2012-02-18 07:31:30 +0000
 1.2 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.1 30-Jan-2012  nisimura branches: 1.1.4; 1.1.6;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 30-Jan-2012  yamt file s3c2440_intr.c was added on branch yamt-pagecache on 2012-04-17 00:06:06 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 30-Jan-2012  mrg file s3c2440_intr.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:30 +0000
 1.1 30-Jan-2012  nisimura branches: 1.1.4; 1.1.6;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 30-Jan-2012  yamt file s3c2440_intr.h was added on branch yamt-pagecache on 2012-04-17 00:06:06 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 30-Jan-2012  mrg file s3c2440_intr.h was added on branch jmcneill-usbmp on 2012-02-18 07:31:30 +0000
 1.5 07-Sep-2025  thorpej Change todr_chip_handle::cookie -> todr_chip_handle::todr_dev, and
make it a device_t. Upcoming functional changes will require the
device_t associated with a TODR device.

Change todr_chip_handle::bus_cookie -> todr_chip_handle::todr_devaux.
Nothing was using the old field, but I decided to keep it around just
in cause something needs it in the future.

And with these largely mechanical yet semantically meaningful changes,
thus spake the Oracle: "Welcome to NetBSD 11.99.2."
 1.4 07-Sep-2025  thorpej Remove unnecessary NULL-initialization of TODR handle fields.
 1.3 02-Jan-2020  thorpej Use todr_gettime_ymdhms / todr_settime_ymdhms.
 1.2 20-Nov-2014  christos branches: 1.2.20;
use the inline bcdtobin and bintobcd directly instead through a macro.
 1.1 07-Feb-2012  nisimura branches: 1.1.4; 1.1.6; 1.1.10;

- add MBR editing menu to sysinst.
- fix typos in timecounter names.
- make sure to drain Tx FIFO to avoid clobbering
kernel boot messages.
- allow to have the 3rd UART.
- add missing time-of-day clock support.

Ok by releng.
 1.1.10.1 03-Dec-2017  jdolecek update from HEAD
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 07-Feb-2012  yamt file s3c2440_rtc.c was added on branch yamt-pagecache on 2012-04-17 00:06:06 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 07-Feb-2012  mrg file s3c2440_rtc.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:30 +0000
 1.2.20.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.8 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.7 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.6 24-Apr-2021  thorpej branches: 1.6.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.5 10-Nov-2019  chs branches: 1.5.10;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.4 25-May-2015  christos branches: 1.4.18;
Add NetBSD RCSID, use c99 initializers.
 1.3 26-Nov-2014  skrll branches: 1.3.2;
Appease gcc 4.8 - from Greg Willatt in private email.
 1.2 27-Oct-2012  chs branches: 1.2.12;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.1 30-Jan-2012  nisimura branches: 1.1.4; 1.1.6; 1.1.10;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.1.10.2 03-Dec-2017  jdolecek update from HEAD
 1.1.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.6.3 30-Oct-2012  yamt sync with head
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 30-Jan-2012  yamt file s3c2440_sdi.c was added on branch yamt-pagecache on 2012-04-17 00:06:06 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 30-Jan-2012  mrg file s3c2440_sdi.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:31 +0000
 1.2.12.1 02-Jan-2015  martin Pull up following revision(s) (requested by skrll in ticket #365):
sys/dev/ic/dm9000.c: revision 1.5
sys/arch/arm/s3c2xx0/s3c2440_sdi.c: revision 1.3
Appease gcc 4.8 - from Greg Willatt in private email.
 1.3.2.1 06-Jun-2015  skrll Sync with HEAD
 1.4.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5.10.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.6.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.5 21-Feb-2025  andvar s/dirver/driver/ in comments.
 1.4 07-Aug-2021  thorpej branches: 1.4.12;
Merge thorpej-cfargs2.
 1.3 24-Apr-2021  thorpej branches: 1.3.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.2 27-Oct-2012  chs branches: 1.2.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.1 30-Jan-2012  nisimura branches: 1.1.4; 1.1.6; 1.1.10;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.1.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.6.3 30-Oct-2012  yamt sync with head
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 30-Jan-2012  yamt file s3c2440_spi.c was added on branch yamt-pagecache on 2012-04-17 00:06:07 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 30-Jan-2012  mrg file s3c2440_spi.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:31 +0000
 1.2.52.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.2.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.2.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.2.52.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.2.52.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.3.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4.12.1 02-Aug-2025  perseant Sync with HEAD
 1.4 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.3 24-Apr-2021  thorpej branches: 1.3.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.2 27-Oct-2012  chs branches: 1.2.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.1 30-Jan-2012  nisimura branches: 1.1.4; 1.1.6; 1.1.10;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.1.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.1.6.3 30-Oct-2012  yamt sync with head
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 30-Jan-2012  yamt file s3c2440_touch.c was added on branch yamt-pagecache on 2012-04-17 00:06:07 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 30-Jan-2012  mrg file s3c2440_touch.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:31 +0000
 1.2.52.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.3.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 07-Feb-2012  nisimura branches: 1.2.4; 1.2.6;

- add MBR editing menu to sysinst.
- fix typos in timecounter names.
- make sure to drain Tx FIFO to avoid clobbering
kernel boot messages.
- allow to have the 3rd UART.
- add missing time-of-day clock support.

Ok by releng.
 1.1 30-Jan-2012  nisimura Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.2.6.2 17-Apr-2012  yamt sync with head
 1.2.6.1 07-Feb-2012  yamt file s3c2440reg.h was added on branch yamt-pagecache on 2012-04-17 00:06:07 +0000
 1.2.4.2 18-Feb-2012  mrg merge to -current.
 1.2.4.1 07-Feb-2012  mrg file s3c2440reg.h was added on branch jmcneill-usbmp on 2012-02-18 07:31:31 +0000
 1.1 30-Jan-2012  nisimura branches: 1.1.4; 1.1.6;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.1.6.2 17-Apr-2012  yamt sync with head
 1.1.6.1 30-Jan-2012  yamt file s3c2440var.h was added on branch yamt-pagecache on 2012-04-17 00:06:07 +0000
 1.1.4.2 18-Feb-2012  mrg merge to -current.
 1.1.4.1 30-Jan-2012  mrg file s3c2440var.h was added on branch jmcneill-usbmp on 2012-02-18 07:31:31 +0000
 1.15 29-May-2020  rin For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
 1.14 10-Feb-2012  nisimura - use a correct bit mask to pick SRCPND register indication.
- reading timer#4 possibly returns value '0'. Having the
'0' and a timer reload interrupt results in a too large
number, meaning the next get_timecounter() call will
return a smaller one than the previous, effectively kill
things. Handle this case.

ping(8) now shows better precisions. Fixes from Paul Fleischer.

Ok by releng.
 1.13 07-Feb-2012  nisimura - add MBR editing menu to sysinst.
- fix typos in timecounter names.
- make sure to drain Tx FIFO to avoid clobbering
kernel boot messages.
- allow to have the 3rd UART.
- add missing time-of-day clock support.

Ok by releng.
 1.12 30-Jan-2012  nisimura Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.11 01-Jul-2011  dyoung branches: 1.11.2; 1.11.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.10 04-Jul-2008  bsh fix slow TOD clock.
 1.9 20-Jan-2008  joerg branches: 1.9.6; 1.9.10; 1.9.12; 1.9.14;
Convert evbarm to timecounter. Only one of the systems was tested, the
rest of the patch is compile-time tested only.
 1.8 06-Jan-2008  matt Cleanup softint lossage.
 1.7 06-Jan-2007  christos branches: 1.7.20; 1.7.24; 1.7.26; 1.7.32; 1.7.38;
Add generic TOD support. From Bucky Katz.
 1.6 24-Dec-2005  perry branches: 1.6.20; 1.6.24;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 04-Jun-2005  he branches: 1.4.2;
Fix -Wcast-qual by sprinkling some consts, and remove named
parameters from a function prototype to avoid shadowing.
Also fix a couple of other shadowing problems.
 1.3 27-Aug-2003  bsh branches: 1.3.4;
+ fix the definition of timer #4 observation register. This change fixed
delay() bug.

+ match the names of timer registers to those in user's manual.
 1.2 04-Aug-2003  bsh various bug fixes. Now SMDK2410 evboard boots up to single user mode
using install ramdisk.
 1.1 31-Jul-2003  bsh the first cut of Samsung S3C2410 support.
It is Samsung's another ARM920 based SoC.

XXX: not tested much yet.
 1.3.4.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.3.4.2 03-Aug-2004  skrll Sync with HEAD
 1.3.4.1 27-Aug-2003  skrll file s3c24x0_clk.c was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.4.2.3 21-Jan-2008  yamt sync with head
 1.4.2.2 26-Feb-2007  yamt sync with head.
 1.4.2.1 21-Jun-2006  yamt sync with head.
 1.6.24.1 30-Apr-2007  bouyer Pull up following revision(s) (requested by rearnsha in ticket #592):
sys/arch/arm/footbridge/footbridgevar.h: revision 1.5
sys/arch/arm/ep93xx/epclk.c: revision 1.10
sys/arch/arm/ixp12x0/ixp12x0_clk.c: revision 1.11
sys/arch/arm/footbridge/footbridge.c: revision 1.17
sys/arch/arm/footbridge/isa/dsrtc.c: revision 1.10
sys/arch/arm/s3c2xx0/s3c2800_clk.c: revision 1.10
sys/arch/arm/xscale/ixp425_timer.c: revision 1.13
sys/arch/arm/xscale/becc_timer.c: revision 1.11
sys/arch/arm/xscale/i80321_timer.c: revision 1.16
sys/arch/arm/s3c2xx0/s3c24x0_clk.c: revision 1.7
Add generic TOD support. From Bucky Katz.
 1.6.20.1 12-Jan-2007  ad Sync with head.
 1.7.38.2 20-Jan-2008  bouyer Sync with HEAD
 1.7.38.1 08-Jan-2008  bouyer Sync with HEAD
 1.7.32.1 18-Feb-2008  mjf Sync with HEAD.
 1.7.26.2 23-Mar-2008  matt sync with HEAD
 1.7.26.1 09-Jan-2008  matt sync with HEAD
 1.7.24.2 27-Jan-2008  chris Sync to HEAD.
 1.7.24.1 20-Jan-2008  chris Sync to HEAD.
 1.7.20.1 28-Feb-2008  rjs Sync with HEAD.
 1.9.14.1 18-Jul-2008  simonb Sync with head.
 1.9.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.9.10.1 04-May-2009  yamt sync with head.
 1.9.6.1 28-Sep-2008  mjf Sync with HEAD.
 1.11.6.1 18-Feb-2012  mrg merge to -current.
 1.11.2.1 17-Apr-2012  yamt sync with head
 1.8 27-Apr-2008  matt Merge kernel changes in matt-armv6 to HEAD.
 1.7 06-Jan-2008  matt branches: 1.7.6; 1.7.8; 1.7.10;
Cleanup softint lossage.
 1.6 24-Dec-2005  perry branches: 1.6.46; 1.6.50; 1.6.52; 1.6.58; 1.6.66;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 24-Sep-2003  mycroft branches: 1.4.16;
Fix GCC 3 barfage.
 1.3 04-Aug-2003  bsh bit polarity of interrupt mask registers don't match between s3c2800
and s3c24[10]0. define macro s3c2xx0_update_hw_mask() for it.
 1.2 31-Jul-2003  bsh the first cut of Samsung S3C2410 support.
It is Samsung's another ARM920 based SoC.

XXX: not tested much yet.
 1.1 02-Jan-2003  thorpej branches: 1.1.2; 1.1.4;
Clean up evbarm interrupt support a little:
* Define an ARM_INTR_IMPL option, which specifies a header file
describing the interrupt implementation for the platform. Use
this instead of the list of EVBARM_BOARDTYPE checks.
* Make the s3c2xx0 interrupt dispatch code a bit more generic, and move
it to a generic location so that other platforms can use it.

This eliminates all uses of the EVBARM_BOARDTYPE stuff, so delete it.
 1.1.4.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.2 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.1 02-Jan-2003  thorpej file s3c24x0_intr.h was added on branch nathanw_sa on 2003-01-03 16:41:10 +0000
 1.4.16.2 21-Jan-2008  yamt sync with head
 1.4.16.1 21-Jun-2006  yamt sync with head.
 1.6.66.1 08-Jan-2008  bouyer Sync with HEAD
 1.6.58.1 18-Feb-2008  mjf Sync with HEAD.
 1.6.52.2 09-Jan-2008  matt sync with HEAD
 1.6.52.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.6.50.1 20-Jan-2008  chris Sync to HEAD.
 1.6.46.1 28-Feb-2008  rjs Sync with HEAD.
 1.7.10.1 16-May-2008  yamt sync with head.
 1.7.8.1 18-May-2008  yamt sync with head.
 1.7.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.16 05-Jul-2024  andvar fix various typos in comments and log messages, mainly s/hight/high/
s/hight/height/ and removing double m in time(ing).
 1.15 20-Nov-2020  thorpej branches: 1.15.24;
malloc(9) -> kmem(9)
 1.14 10-Nov-2019  chs branches: 1.14.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.13 03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER! Some subsystems have

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

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

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

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

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

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

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.12 21-Aug-2014  maxv branches: 1.12.18; 1.12.20;
Remove dead returns:

return VAR/func(XX);
return VAR;

The latter is never reached. Sent on tech-kern@, no disagreement.
 1.11 10-Mar-2014  htodd Delete unused variables for new gcc.
 1.10 27-Oct-2012  chs branches: 1.10.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.9 30-Jan-2012  nisimura branches: 1.9.6;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.8 11-Jan-2012  macallan adjust wsfont_find()
 1.7 01-Jul-2011  dyoung branches: 1.7.2; 1.7.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.6 15-Dec-2007  perry __FUNCTION__ -> __func__
 1.5 04-Mar-2007  christos branches: 1.5.16; 1.5.20; 1.5.22; 1.5.30; 1.5.34;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.4 15-Apr-2006  jmmv branches: 1.4.14;
Add missing parameter to s3c24x0_lcd_{ioctl,mmap} functions (after the
change in wscons that modified their signature) to let this build again.
Pointed out by he@.
 1.3 11-Dec-2005  christos branches: 1.3.4; 1.3.6; 1.3.8; 1.3.10; 1.3.12;
merge ktrace-lwp.
 1.2 04-Jun-2005  he branches: 1.2.2;
Fix -Wcast-qual by sprinkling some consts, and remove named
parameters from a function prototype to avoid shadowing.
Also fix a couple of other shadowing problems.
 1.1 14-Feb-2004  bsh branches: 1.1.4;
Support S3C24X0's on-chip LCD controller.

lcd driver can be configured with or without wsdisplay.
With wsdisplay, it supports text mode using rasops in 8bpp or 16bpp.
Without it, users only can mmap(2) the framebuffer.

XXX: 1-, 2-, 4-, or 24- bpp mode is not supported yet.
XXX: S3C24x0's LCD controller can have virtual screen which is bigger
than actual LCD panel. Our wsdisplay framework doesn't have
features to utilize it.
 1.1.4.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.4.5 17-Jan-2005  skrll Adapt to branch.
 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 14-Feb-2004  skrll file s3c24x0_lcd.c was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.2.2.3 21-Jan-2008  yamt sync with head
 1.2.2.2 03-Sep-2007  yamt sync with head.
 1.2.2.1 21-Jun-2006  yamt sync with head.
 1.3.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.3.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.3.8.1 24-May-2006  yamt sync with head.
 1.3.6.1 22-Apr-2006  simonb Sync with head.
 1.3.4.1 09-Sep-2006  rpaulo sync with head
 1.4.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.5.34.1 02-Jan-2008  bouyer Sync with HEAD
 1.5.30.1 26-Dec-2007  ad Sync with head.
 1.5.22.1 09-Jan-2008  matt sync with HEAD
 1.5.20.1 01-Jan-2008  chris Sync with HEAD.
 1.5.16.1 26-Dec-2007  rjs Sync with HEAD.
 1.7.6.1 18-Feb-2012  mrg merge to -current.
 1.7.2.3 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.7.2.2 30-Oct-2012  yamt sync with head
 1.7.2.1 17-Apr-2012  yamt sync with head
 1.9.6.3 03-Dec-2017  jdolecek update from HEAD
 1.9.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.10.2.1 18-May-2014  rmind sync with head
 1.12.20.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12.20.1 10-Jun-2019  christos Sync with HEAD
 1.12.18.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.14.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.15.24.1 02-Aug-2025  perseant Sync with HEAD
 1.7 23-May-2022  andvar s/controll/control/ in comments.
 1.6 30-Jan-2012  nisimura Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.5 01-Jul-2011  dyoung branches: 1.5.2; 1.5.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.4 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.3 15-Apr-2006  jmmv branches: 1.3.14;
Add missing parameter to s3c24x0_lcd_{ioctl,mmap} functions (after the
change in wscons that modified their signature) to let this build again.
Pointed out by he@.
 1.2 11-Dec-2005  christos branches: 1.2.4; 1.2.6; 1.2.8; 1.2.10; 1.2.12;
merge ktrace-lwp.
 1.1 14-Feb-2004  bsh branches: 1.1.4; 1.1.18;
Support S3C24X0's on-chip LCD controller.

lcd driver can be configured with or without wsdisplay.
With wsdisplay, it supports text mode using rasops in 8bpp or 16bpp.
Without it, users only can mmap(2) the framebuffer.

XXX: 1-, 2-, 4-, or 24- bpp mode is not supported yet.
XXX: S3C24x0's LCD controller can have virtual screen which is bigger
than actual LCD panel. Our wsdisplay framework doesn't have
features to utilize it.
 1.1.18.2 03-Sep-2007  yamt sync with head.
 1.1.18.1 21-Jun-2006  yamt sync with head.
 1.1.4.5 17-Jan-2005  skrll Adapt to branch.
 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 14-Feb-2004  skrll file s3c24x0_lcd.h was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.2.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.2.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.2.8.1 24-May-2006  yamt sync with head.
 1.2.6.1 22-Apr-2006  simonb Sync with head.
 1.2.4.1 09-Sep-2006  rpaulo sync with head
 1.3.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.5.6.1 18-Feb-2012  mrg merge to -current.
 1.5.2.1 17-Apr-2012  yamt sync with head
 1.3 30-Jan-2012  nisimura Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.2 11-Dec-2005  christos branches: 1.2.114; 1.2.118;
merge ktrace-lwp.
 1.1 14-Feb-2004  bsh branches: 1.1.4;
SPI support for Samsung S3C2410.

spi driver doesn't provide any actual I/O, and attaches child drivers
for devices that hooked to SPI ports.
 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 14-Feb-2004  skrll file s3c24x0_spi.h was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.2.118.1 18-Feb-2012  mrg merge to -current.
 1.2.114.1 17-Apr-2012  yamt sync with head
 1.11 23-May-2022  andvar s/controll/control/ in comments.
 1.10 30-Jan-2012  nisimura Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.9 21-Feb-2010  bsh branches: 1.9.10; 1.9.14;
Modify definitions for ULCOM register of UART according to S3C2800
User's manual rev 1.3.

The values of ULCON_PARITY_SHIFT and ULCON_IR are now same to those
for S3C2410. So the definitions are moved to s3c2xx0reg.h. (Old
definitions from User's manual rev1.1 were differ to those for
S3C2410, and that was why I put them in s3c2800reg.h and s3c24x0reg.h.
There's no description in errata about this changes.)

Also, fix the value for UMSTAT_DCTS on 2800.

The values of UMCON_AFC and UMSTAT_DCTS still differ between 2800 and
2410.

Reported by Brett Slager. Thank you very much.
 1.8 11-Dec-2005  christos branches: 1.8.80; 1.8.100;
merge ktrace-lwp.
 1.7 12-Feb-2004  bsh branches: 1.7.4;
add register definitions for LCD controller, AD converter, and SPI.
 1.6 12-Feb-2004  bsh be consistent with #define<TAB>
 1.5 03-Sep-2003  mycroft Minor tweak for some macros elsewhere.
 1.4 27-Aug-2003  bsh + fix the definition of timer #4 observation register. This change fixed
delay() bug.

+ match the names of timer registers to those in user's manual.
 1.3 27-Aug-2003  bsh move some definitions of register block size from s3c24[10]0reg.h
to s3c24x0reg.h when they are same for S3C2410 and 2400, and rename them as
S3C24X0_FOO_SIZE.
 1.2 04-Aug-2003  bsh + fix TCON register bit definitions. Thank you Samsung for stupid
register design.

+ add definitions for UART registers that are not compatible with
S3C2800's.
 1.1 31-Jul-2003  bsh the first cut of Samsung S3C2410 support.
It is Samsung's another ARM920 based SoC.

XXX: not tested much yet.
 1.7.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.7.4.2 03-Aug-2004  skrll Sync with HEAD
 1.7.4.1 12-Feb-2004  skrll file s3c24x0reg.h was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.8.100.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.8.80.1 11-Mar-2010  yamt sync with head
 1.9.14.1 18-Feb-2012  mrg merge to -current.
 1.9.10.1 17-Apr-2012  yamt sync with head
 1.4 30-Jan-2012  nisimura Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.3 11-Dec-2005  christos branches: 1.3.114; 1.3.118;
merge ktrace-lwp.
 1.2 16-Mar-2005  bsh Switch SMDK2410 and SMDK2800 kernels to use pmap_devmap_bootstrap() to map
I/O registers that are used in early start-up stage. This replaces the
special bootstrap-time-only bus_space_map function in smdk{2410,2800}_machdep.c.

This makes SMDK{2410,2800}'s initarm() a bit simpler, and gives us smaller diffs
to other evbarm platforms.

An another good thing for SMDK2800 is that now we have all built-in peripheral
registers mapped in 2 segments. We may expect less TLB miss on I/O access
(very slightly).
 1.1 31-Jul-2003  bsh branches: 1.1.4; 1.1.10; 1.1.12;
the first cut of Samsung S3C2410 support.
It is Samsung's another ARM920 based SoC.

XXX: not tested much yet.
 1.1.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.10.1 29-Apr-2005  kent sync with -current
 1.1.4.5 01-Apr-2005  skrll 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 31-Jul-2003  skrll file s3c24x0var.h was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.3.118.1 18-Feb-2012  mrg merge to -current.
 1.3.114.1 17-Apr-2012  yamt sync with head
 1.16 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.15 24-Apr-2021  thorpej branches: 1.15.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.14 27-Oct-2012  chs branches: 1.14.52;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.13 30-Jan-2012  nisimura branches: 1.13.6;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.12 01-Jul-2011  dyoung branches: 1.12.2; 1.12.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.11 11-Dec-2005  christos merge ktrace-lwp.
 1.10 26-Aug-2005  drochner s/locdesc_t/int/g
 1.9 30-Jun-2005  drochner branches: 1.9.2;
adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes
 1.8 16-Mar-2005  bsh Switch SMDK2410 and SMDK2800 kernels to use pmap_devmap_bootstrap() to map
I/O registers that are used in early start-up stage. This replaces the
special bootstrap-time-only bus_space_map function in smdk{2410,2800}_machdep.c.

This makes SMDK{2410,2800}'s initarm() a bit simpler, and gives us smaller diffs
to other evbarm platforms.

An another good thing for SMDK2800 is that now we have all built-in peripheral
registers mapped in 2 segments. We may expect less TLB miss on I/O access
(very slightly).
 1.7 04-Aug-2003  bsh branches: 1.7.8; 1.7.10;
+ cleanup attach message.
+ use aprint_normal()
 1.6 01-Aug-2003  bsh change an arg of s3c2800_clk_freq() to match with s3c24x0_clk_freq().
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 13-May-2003  bsh branches: 1.4.2;
+ use SWRCON register for software reset.

+ add s3c2800_clock_freq(): calculate [FHP]CLK from values in PLL
control registers and S3C2XX0_XTAL_CLK.
 1.3 03-May-2003  bsh fix typo in an error message. reported by Jonathan Cline on port-arm.
 1.2 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file s3c2800.c was added on branch nathanw_sa on 2002-12-11 05:53:13 +0000
 1.4.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.4 01-Apr-2005  skrll Sync with HEAD.
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.9.2.1 21-Jun-2006  yamt sync with head.
 1.12.6.1 18-Feb-2012  mrg merge to -current.
 1.12.2.2 30-Oct-2012  yamt sync with head
 1.12.2.1 17-Apr-2012  yamt sync with head
 1.13.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.52.5 05-Apr-2021  thorpej config_match() -> config_probe() for the straight-forward indirect config
cases. There are still a few odd balls using config_match() which should
be sorted out later.
 1.14.52.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.14.52.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.14.52.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.14.52.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.15.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.18 29-May-2020  rin For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
 1.17 07-Feb-2012  nisimura - add MBR editing menu to sysinst.
- fix typos in timecounter names.
- make sure to drain Tx FIFO to avoid clobbering
kernel boot messages.
- allow to have the 3rd UART.
- add missing time-of-day clock support.

Ok by releng.
 1.16 01-Jul-2011  dyoung branches: 1.16.2; 1.16.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.15 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.14 04-Jul-2008  bsh branches: 1.14.4; 1.14.10;
fix slow TOD clock.
 1.13 22-Jan-2008  joerg branches: 1.13.6; 1.13.10; 1.13.12; 1.13.14;
Fix up my last commit. statintr and a misnamed variable slipped through.
 1.12 20-Jan-2008  joerg Convert evbarm to timecounter. Only one of the systems was tested, the
rest of the patch is compile-time tested only.
 1.11 06-Jan-2008  matt Cleanup softint lossage.
 1.10 06-Jan-2007  christos branches: 1.10.20; 1.10.24; 1.10.26; 1.10.32; 1.10.38;
Add generic TOD support. From Bucky Katz.
 1.9 24-Dec-2005  perry branches: 1.9.20; 1.9.24;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 05-Jun-2005  he branches: 1.7.2;
Fix a shadowing warning by renaming an (unused) function parameter.
 1.6 01-Aug-2003  bsh delete an incorrecct comment
delete unused definitions
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 13-May-2003  bsh branches: 1.4.2;
+ use system's real PCLK frequency for calculation, instead of a compile
time constant.

+ make delay() more accurate.
 1.3 12-May-2003  bsh add an arg to s3c2800_intr_establish() for interrupt type.
 1.2 02-Jan-2003  thorpej Don't need to explicitly include <arm/s3c2xx0/s3c2xx0_intr.h>.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file s3c2800_clk.c was added on branch nathanw_sa on 2002-12-11 05:53:14 +0000
 1.4.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.2.4 04-Feb-2008  yamt sync with head.
 1.7.2.3 21-Jan-2008  yamt sync with head
 1.7.2.2 26-Feb-2007  yamt sync with head.
 1.7.2.1 21-Jun-2006  yamt sync with head.
 1.9.24.1 30-Apr-2007  bouyer Pull up following revision(s) (requested by rearnsha in ticket #592):
sys/arch/arm/footbridge/footbridgevar.h: revision 1.5
sys/arch/arm/ep93xx/epclk.c: revision 1.10
sys/arch/arm/ixp12x0/ixp12x0_clk.c: revision 1.11
sys/arch/arm/footbridge/footbridge.c: revision 1.17
sys/arch/arm/footbridge/isa/dsrtc.c: revision 1.10
sys/arch/arm/s3c2xx0/s3c2800_clk.c: revision 1.10
sys/arch/arm/xscale/ixp425_timer.c: revision 1.13
sys/arch/arm/xscale/becc_timer.c: revision 1.11
sys/arch/arm/xscale/i80321_timer.c: revision 1.16
sys/arch/arm/s3c2xx0/s3c24x0_clk.c: revision 1.7
Add generic TOD support. From Bucky Katz.
 1.9.20.1 12-Jan-2007  ad Sync with head.
 1.10.38.3 23-Jan-2008  bouyer Sync with HEAD.
 1.10.38.2 20-Jan-2008  bouyer Sync with HEAD
 1.10.38.1 08-Jan-2008  bouyer Sync with HEAD
 1.10.32.1 18-Feb-2008  mjf Sync with HEAD.
 1.10.26.2 23-Mar-2008  matt sync with HEAD
 1.10.26.1 09-Jan-2008  matt sync with HEAD
 1.10.24.2 27-Jan-2008  chris Sync to HEAD.
 1.10.24.1 20-Jan-2008  chris Sync to HEAD.
 1.10.20.1 28-Feb-2008  rjs Sync with HEAD.
 1.13.14.1 18-Jul-2008  simonb Sync with head.
 1.13.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.13.10.1 04-May-2009  yamt sync with head.
 1.13.6.1 28-Sep-2008  mjf Sync with HEAD.
 1.14.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.16.6.1 18-Feb-2012  mrg merge to -current.
 1.16.2.1 17-Apr-2012  yamt sync with head
 1.14 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.13 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.12 20-Dec-2010  matt Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.11 27-Apr-2008  matt branches: 1.11.22;
Merge kernel changes in matt-armv6 to HEAD.
 1.10 06-Jan-2008  matt branches: 1.10.6; 1.10.8; 1.10.10;
Cleanup softint lossage.
 1.9 24-Dec-2005  perry branches: 1.9.46; 1.9.50; 1.9.52; 1.9.58; 1.9.66;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 01-Aug-2003  bsh branches: 1.7.16;
tweak to share s3c2xx0_intr.c for S3C2800 and S3C2410.

move init_interrupt_masks() from s3c2xx0_intr.c to s3c2800_intr.c, since
it doesn't work for S3C2410.
 1.6 30-Jul-2003  bsh + enable nested interrupts. This change stopped silo overflow messages
at 115200bps.

+ disable all hard interrupts by default.

+ rewrite s3c2xx0_(un)mask_interrupt() to make them faster.
 1.5 15-Jul-2003  lukem __KERNEL_RCSID()
 1.4 12-May-2003  bsh branches: 1.4.2;
+ add an arg to s3c2800_intr_establish() for interrupt type:
IST_EDGE_{FALLING,RISING,BOTH}, or IST_LEVEL_{LOW,HIGH}. This
argument is valid only for GPIO interrupts (IRQ0..7).

+ Don't clear interrupt pending bits for IIC in interrupt handler.
Since clearing these bits starts next IIC transmission immediately,
IIC driver should handle these.
 1.3 03-Jan-2003  thorpej Fiddle with current_intr_depth in assembly code again. Because we
have just pushed a frame, we can make some assumptions that the
compiler cannot as easily make, and can thus do it slightly more
efficiently.
 1.2 02-Jan-2003  thorpej Don't need to explicitly include <arm/s3c2xx0/s3c2xx0_intr.h>.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file s3c2800_intr.c was added on branch nathanw_sa on 2002-12-11 05:53:14 +0000
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.7.16.2 21-Jan-2008  yamt sync with head
 1.7.16.1 21-Jun-2006  yamt sync with head.
 1.9.66.1 08-Jan-2008  bouyer Sync with HEAD
 1.9.58.1 18-Feb-2008  mjf Sync with HEAD.
 1.9.52.2 28-Jan-2008  matt Given the that there are only 4 IPLs (ignoring soft IPLs), a number of
cleanups can be done:
Remove _SPL_* aliases.
Don't store irqmasks in ci_cpl, just make it an ipl level.
Add fast softint switching support.
 1.9.52.1 09-Jan-2008  matt sync with HEAD
 1.9.50.1 20-Jan-2008  chris Sync to HEAD.
 1.9.46.1 28-Feb-2008  rjs Sync with HEAD.
 1.10.10.1 16-May-2008  yamt sync with head.
 1.10.8.1 18-May-2008  yamt sync with head.
 1.10.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.22.1 05-Mar-2011  rmind sync with head
 1.5 06-Jan-2008  matt Cleanup softint lossage.
 1.4 11-Dec-2005  christos branches: 1.4.46; 1.4.50; 1.4.52; 1.4.58; 1.4.66;
merge ktrace-lwp.
 1.3 04-Aug-2003  bsh branches: 1.3.16;
bit polarity of interrupt mask registers don't match between s3c2800
and s3c24[10]0. define macro s3c2xx0_update_hw_mask() for it.
 1.2 01-Aug-2003  bsh tweak to share s3c2xx0_intr.c for S3C2800 and S3C2410.

move init_interrupt_masks() from s3c2xx0_intr.c to s3c2800_intr.c, since
it doesn't work for S3C2410.
 1.1 02-Jan-2003  thorpej branches: 1.1.2; 1.1.4;
Clean up evbarm interrupt support a little:
* Define an ARM_INTR_IMPL option, which specifies a header file
describing the interrupt implementation for the platform. Use
this instead of the list of EVBARM_BOARDTYPE checks.
* Make the s3c2xx0 interrupt dispatch code a bit more generic, and move
it to a generic location so that other platforms can use it.

This eliminates all uses of the EVBARM_BOARDTYPE stuff, so delete it.
 1.1.4.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.1 03-Aug-2004  skrll Sync with HEAD
 1.1.2.2 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.1 02-Jan-2003  thorpej file s3c2800_intr.h was added on branch nathanw_sa on 2003-01-03 16:41:10 +0000
 1.3.16.1 21-Jan-2008  yamt sync with head
 1.4.66.1 08-Jan-2008  bouyer Sync with HEAD
 1.4.58.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.52.1 09-Jan-2008  matt sync with HEAD
 1.4.50.1 20-Jan-2008  chris Sync to HEAD.
 1.4.46.1 28-Feb-2008  rjs Sync with HEAD.
 1.34 25-Sep-2022  andvar s/itnerrupt/interrupt/
 1.33 23-May-2022  andvar s/boundries/boundaries/, s/itterate/iterate/ and few more typos.
 1.32 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.31 24-Apr-2021  thorpej branches: 1.31.8;
Merge thorpej-cfargs branch:

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

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

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

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

...and a sentinel value CFARG_EOL.

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

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.30 20-Nov-2020  thorpej branches: 1.30.2;
malloc(9) -> kmem(9)
 1.29 07-Jul-2020  thorpej branches: 1.29.2;
Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
Provide a new resource provider API:

==> pciconf_resource_init() -- Initialize a PCI configuration resources
container.
==> pciconf_resource_add() -- Add a PCI configuration resource to the
container (I/O, MEM, or prefetchable MEM). Multiple resources of
each type may be added.
==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
container once the bus has been configured.

This is much easier to use than the previous method of providing an
extent map for each kind of resource, and works better for e.g. ACPI
platforms that provide potentially multiple PCI resources in tables
provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
rather than extent maps.
 1.28 14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.27 10-Nov-2019  chs in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.26 26-Nov-2018  jmcneill Switch to designated initializers
 1.25 16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.24 08-Nov-2018  skrll Fix build after recent arm32_pci_chipset change
 1.23 19-Apr-2017  jmcneill branches: 1.23.10; 1.23.12;
Initialize intr_setattr of arm32_pci_chipset
 1.22 02-Oct-2015  msaitoh branches: 1.22.2; 1.22.4;
PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.21 29-Mar-2014  christos branches: 1.21.6;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.20 18-Aug-2013  matt <arm/locore.h> fallout (fixes some include ordering errors)
 1.19 27-Oct-2012  chs branches: 1.19.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.18 07-Sep-2012  matt branches: 1.18.2;
Fix more pci_conf_interrupt/pci_conf_hook problems
 1.17 27-Jan-2012  para converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
 1.16 01-Jul-2011  dyoung branches: 1.16.2; 1.16.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.15 17-May-2011  dyoung PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name. Correct that.

Rename PCI_FLAGS_IO_ENABLED to PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_ENABLED to PCI_FLAGS_MEM_OKAY, thus making their names
consistent with the other PCI flags and poisoning 3rd-party driver
sources that use the flags in the old bad way.

This patch produces no binary changes in this set of PCI kernels when
they are compiled w/o 'options DIAGNOSTIC' and w/ -V MKREPRO=yes:

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
 1.14 04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.13 06-Jan-2008  matt branches: 1.13.32; 1.13.38;
Cleanup softint lossage.
 1.12 04-Mar-2007  christos branches: 1.12.16; 1.12.20; 1.12.22; 1.12.28; 1.12.34;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.11 24-Nov-2005  yamt branches: 1.11.26;
bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
 1.10 01-Apr-2005  yamt branches: 1.10.2; 1.10.8;
merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.9 30-Aug-2004  drochner branches: 1.9.4; 1.9.6;
Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
 1.8 24-Apr-2004  kleink Update for new pci_devinfo(9) signature.
 1.7 15-Jul-2003  lukem __KERNEL_RCSID()
 1.6 18-Jun-2003  bsh branches: 1.6.2;
don't map PCI device's I/O ports at address 0.

This fixed a problem when 3com 3C905 is a only PCI card on SMDK2800.
 1.5 15-Jun-2003  fvdl Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
 1.4 12-May-2003  bsh add an arg to s3c2800_intr_establish() for interrupt type.
 1.3 01-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.2 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file s3c2800_pci.c was added on branch nathanw_sa on 2002-12-11 05:53:14 +0000
 1.6.2.6 11-Dec-2005  christos Sync with head.
 1.6.2.5 01-Apr-2005  skrll Sync with HEAD.
 1.6.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.6.2.2 03-Sep-2004  skrll Sync with HEAD
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.9.6.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.9.4.1 29-Apr-2005  kent sync with -current
 1.10.8.1 29-Nov-2005  yamt sync with head.
 1.10.2.3 21-Jan-2008  yamt sync with head
 1.10.2.2 03-Sep-2007  yamt sync with head.
 1.10.2.1 21-Jun-2006  yamt sync with head.
 1.11.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.12.34.1 08-Jan-2008  bouyer Sync with HEAD
 1.12.28.1 18-Feb-2008  mjf Sync with HEAD.
 1.12.22.1 09-Jan-2008  matt sync with HEAD
 1.12.20.1 20-Jan-2008  chris Sync to HEAD.
 1.12.16.1 28-Feb-2008  rjs Sync with HEAD.
 1.13.38.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.32.2 31-May-2011  rmind sync with head
 1.13.32.1 21-Apr-2011  rmind sync with head
 1.16.6.1 18-Feb-2012  mrg merge to -current.
 1.16.2.3 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.16.2.2 30-Oct-2012  yamt sync with head
 1.16.2.1 17-Apr-2012  yamt sync with head
 1.18.2.3 03-Dec-2017  jdolecek update from HEAD
 1.18.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.2.2 18-May-2014  rmind sync with head
 1.19.2.1 28-Aug-2013  rmind sync with head
 1.21.6.2 28-Aug-2017  skrll Sync with HEAD
 1.21.6.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.22.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.22.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.23.12.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.23.12.1 10-Jun-2019  christos Sync with HEAD
 1.23.10.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.23.10.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.29.2.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.30.2.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.31.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.8 23-May-2022  andvar s/controll/control/ in comments.
 1.7 21-Feb-2010  bsh Modify definitions for ULCOM register of UART according to S3C2800
User's manual rev 1.3.

The values of ULCON_PARITY_SHIFT and ULCON_IR are now same to those
for S3C2410. So the definitions are moved to s3c2xx0reg.h. (Old
definitions from User's manual rev1.1 were differ to those for
S3C2410, and that was why I put them in s3c2800reg.h and s3c24x0reg.h.
There's no description in errata about this changes.)

Also, fix the value for UMSTAT_DCTS on 2800.

The values of UMCON_AFC and UMSTAT_DCTS still differ between 2800 and
2410.

Reported by Brett Slager. Thank you very much.
 1.6 11-Dec-2005  christos branches: 1.6.80; 1.6.100;
merge ktrace-lwp.
 1.5 16-Mar-2005  bsh Switch SMDK2410 and SMDK2800 kernels to use pmap_devmap_bootstrap() to map
I/O registers that are used in early start-up stage. This replaces the
special bootstrap-time-only bus_space_map function in smdk{2410,2800}_machdep.c.

This makes SMDK{2410,2800}'s initarm() a bit simpler, and gives us smaller diffs
to other evbarm platforms.

An another good thing for SMDK2800 is that now we have all built-in peripheral
registers mapped in 2 segments. We may expect less TLB miss on I/O access
(very slightly).
 1.4 12-Feb-2004  bsh branches: 1.4.8; 1.4.10;
be consistent with #define<TAB>
 1.3 04-Aug-2003  bsh Samsung's S3C2800 and S3C24[10]0 CPUs have same built-in UART block,
but there are very small diffs in register definitions. For that, add
new options SSCOM_S3C{2800,2410,2400} and include appropriate
s3c*reg.h.

SSCOM_S3C2410 is also needed for interrupt controller differences.
 1.2 12-May-2003  bsh branches: 1.2.2;
add PLLCON register definitions.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file s3c2800reg.h was added on branch nathanw_sa on 2002-12-11 05:53:15 +0000
 1.2.2.4 01-Apr-2005  skrll Sync with HEAD.
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.8.1 29-Apr-2005  kent sync with -current
 1.6.100.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.6.80.1 11-Mar-2010  yamt sync with head
 1.7 11-Dec-2005  christos merge ktrace-lwp.
 1.6 16-Mar-2005  bsh Switch SMDK2410 and SMDK2800 kernels to use pmap_devmap_bootstrap() to map
I/O registers that are used in early start-up stage. This replaces the
special bootstrap-time-only bus_space_map function in smdk{2410,2800}_machdep.c.

This makes SMDK{2410,2800}'s initarm() a bit simpler, and gives us smaller diffs
to other evbarm platforms.

An another good thing for SMDK2800 is that now we have all built-in peripheral
registers mapped in 2 segments. We may expect less TLB miss on I/O access
(very slightly).
 1.5 01-Aug-2003  bsh branches: 1.5.8; 1.5.10;
change an arg of s3c2800_clk_freq() to match with s3c24x0_clk_freq().
 1.4 13-May-2003  bsh branches: 1.4.2;
+ use SWRCON register for software reset.

+ add s3c2800_clock_freq(): calculate [FHP]CLK from values in PLL
control registers and S3C2XX0_XTAL_CLK.
 1.3 12-May-2003  bsh add an arg to s3c2800_intr_establish() for interrupt type.
 1.2 03-May-2003  bsh delete duplicated #include. reported by Jonathan Cline on port-arm.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file s3c2800var.h was added on branch nathanw_sa on 2002-12-11 05:53:16 +0000
 1.4.2.4 01-Apr-2005  skrll Sync with HEAD.
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.5.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.5.8.1 29-Apr-2005  kent sync with -current
 1.6 17-Jun-2020  thorpej <sys/extent.h> not needed here.
 1.5 18-Sep-2012  matt Add bounce buffer support for ARM bus_dma(9). Add macros to help initialize
bus_dma_tag structures.
 1.4 01-Jul-2011  dyoung branches: 1.4.2; 1.4.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 05-Aug-2003  bsh branches: 1.2.4;
forgot to add copyright.
 1.1 05-Aug-2003  bsh add s3c2xx0_busdma.c which is used to initialize bus dma tag.
 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 05-Aug-2003  skrll file s3c2xx0_busdma.c was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.4.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.4.2.1 30-Oct-2012  yamt sync with head
 1.19 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.18 26-Mar-2014  christos kill sprintf
 1.17 27-Feb-2014  joerg GC __raise.
 1.16 30-Jan-2012  nisimura branches: 1.16.6; 1.16.10;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.15 01-Jul-2011  dyoung branches: 1.15.2; 1.15.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.14 20-Dec-2010  matt Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
 1.13 27-Apr-2008  matt branches: 1.13.22;
Merge kernel changes in matt-armv6 to HEAD.
 1.12 06-Jan-2008  matt branches: 1.12.6; 1.12.8; 1.12.10;
Cleanup softint lossage.
 1.11 24-Nov-2006  wiz branches: 1.11.24; 1.11.28; 1.11.30; 1.11.36; 1.11.44;
s/heirarchy/hierarchy/, from Zafer.
 1.10 24-Dec-2005  perry branches: 1.10.20; 1.10.22;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.9 11-Dec-2005  christos merge ktrace-lwp.
 1.8 17-Dec-2003  bsh branches: 1.8.16;
add a function to initialize variables used by splfoo().
This should be called in bootstrap so that splfoo() doesn't touch illegal address.
 1.7 04-Aug-2003  bsh initialize global_intr_mask.
 1.6 01-Aug-2003  bsh tweak to share s3c2xx0_intr.c for S3C2800 and S3C2410.

move init_interrupt_masks() from s3c2xx0_intr.c to s3c2800_intr.c, since
it doesn't work for S3C2410.
 1.5 30-Jul-2003  bsh + enable nested interrupts. This change stopped silo overflow messages
at 115200bps.

+ disable all hard interrupts by default.

+ rewrite s3c2xx0_(un)mask_interrupt() to make them faster.
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 16-Jun-2003  thorpej branches: 1.3.2;
Rename IPL_IMP -> IPL_VM.
 1.2 02-Jan-2003  thorpej Don't need to explicitly include <arm/s3c2xx0/s3c2xx0_intr.h>.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file s3c2xx0_intr.c was added on branch nathanw_sa on 2002-12-11 05:53:16 +0000
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.3 21-Jan-2008  yamt sync with head
 1.8.16.2 30-Dec-2006  yamt sync with head.
 1.8.16.1 21-Jun-2006  yamt sync with head.
 1.10.22.1 10-Dec-2006  yamt sync with head.
 1.10.20.1 12-Jan-2007  ad Sync with head.
 1.11.44.1 08-Jan-2008  bouyer Sync with HEAD
 1.11.36.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.30.3 28-Jan-2008  matt Given the that there are only 4 IPLs (ignoring soft IPLs), a number of
cleanups can be done:
Remove _SPL_* aliases.
Don't store irqmasks in ci_cpl, just make it an ipl level.
Add fast softint switching support.
 1.11.30.2 09-Jan-2008  matt sync with HEAD
 1.11.30.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.11.28.1 20-Jan-2008  chris Sync to HEAD.
 1.11.24.1 28-Feb-2008  rjs Sync with HEAD.
 1.12.10.1 16-May-2008  yamt sync with head.
 1.12.8.1 18-May-2008  yamt sync with head.
 1.12.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.22.1 05-Mar-2011  rmind sync with head
 1.15.6.1 18-Feb-2012  mrg merge to -current.
 1.15.2.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.15.2.1 17-Apr-2012  yamt sync with head
 1.16.10.1 18-May-2014  rmind sync with head
 1.16.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15 14-Mar-2014  matt #include <sys/evcnt.h>
 1.14 30-Jan-2012  nisimura branches: 1.14.6; 1.14.10;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.13 19-Nov-2008  matt branches: 1.13.16; 1.13.20;
Don't include <machine/atomic.h> anymore.
 1.12 27-Apr-2008  matt branches: 1.12.6; 1.12.8;
Merge kernel changes in matt-armv6 to HEAD.
 1.11 06-Jan-2008  matt branches: 1.11.6; 1.11.8; 1.11.10;
Cleanup softint lossage.
 1.10 24-Dec-2005  perry branches: 1.10.36; 1.10.46; 1.10.50; 1.10.52; 1.10.58; 1.10.66;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.9 11-Dec-2005  christos merge ktrace-lwp.
 1.8 04-Jun-2005  he branches: 1.8.2;
Add an __UNVOLATILE() in atomic_set_bit() usage.
Revisit if we can adjust atomic_set_bit()'s signature.
 1.7 12-Feb-2004  bsh be consistent with #define<TAB>
 1.6 17-Dec-2003  bsh add a function to initialize variables used by splfoo().
This should be called in bootstrap so that splfoo() doesn't touch illegal address.
 1.5 21-Sep-2003  matt Fix GCC 3.3.1 nits.
 1.4 04-Aug-2003  bsh bit polarity of interrupt mask registers don't match between s3c2800
and s3c24[10]0. define macro s3c2xx0_update_hw_mask() for it.
 1.3 30-Jul-2003  bsh + enable nested interrupts. This change stopped silo overflow messages
at 115200bps.

+ disable all hard interrupts by default.

+ rewrite s3c2xx0_(un)mask_interrupt() to make them faster.
 1.2 02-Jan-2003  thorpej branches: 1.2.2;
Clean up evbarm interrupt support a little:
* Define an ARM_INTR_IMPL option, which specifies a header file
describing the interrupt implementation for the platform. Use
this instead of the list of EVBARM_BOARDTYPE checks.
* Make the s3c2xx0 interrupt dispatch code a bit more generic, and move
it to a generic location so that other platforms can use it.

This eliminates all uses of the EVBARM_BOARDTYPE stuff, so delete it.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file s3c2xx0_intr.h was added on branch nathanw_sa on 2002-12-11 05:53:17 +0000
 1.2.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.8.2.2 21-Jan-2008  yamt sync with head
 1.8.2.1 21-Jun-2006  yamt sync with head.
 1.10.66.1 08-Jan-2008  bouyer Sync with HEAD
 1.10.58.1 18-Feb-2008  mjf Sync with HEAD.
 1.10.52.3 28-Jan-2008  matt Given the that there are only 4 IPLs (ignoring soft IPLs), a number of
cleanups can be done:
Remove _SPL_* aliases.
Don't store irqmasks in ci_cpl, just make it an ipl level.
Add fast softint switching support.
 1.10.52.2 09-Jan-2008  matt sync with HEAD
 1.10.52.1 09-Nov-2007  matt Make all the evbarm kernels build again. Fix lossage from rebase.
 1.10.50.1 20-Jan-2008  chris Sync to HEAD.
 1.10.46.1 28-Feb-2008  rjs Sync with HEAD.
 1.10.36.1 19-Apr-2007  thorpej Convert to the new atomic ops API.
 1.11.10.2 04-May-2009  yamt sync with head.
 1.11.10.1 16-May-2008  yamt sync with head.
 1.11.8.1 18-May-2008  yamt sync with head.
 1.11.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.11.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.12.6.1 13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.13.20.1 18-Feb-2012  mrg merge to -current.
 1.13.16.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.13.16.1 17-Apr-2012  yamt sync with head
 1.14.10.1 18-May-2014  rmind sync with head
 1.14.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2 02-Jan-2003  thorpej Clean up evbarm interrupt support a little:
* Define an ARM_INTR_IMPL option, which specifies a header file
describing the interrupt implementation for the platform. Use
this instead of the list of EVBARM_BOARDTYPE checks.
* Make the s3c2xx0 interrupt dispatch code a bit more generic, and move
it to a generic location so that other platforms can use it.

This eliminates all uses of the EVBARM_BOARDTYPE stuff, so delete it.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file s3c2xx0_irq.S was added on branch nathanw_sa on 2002-12-11 05:53:17 +0000
 1.10 16-Mar-2018  ryo use designated initializer to make adaptability and flexibility for changing struct bus_space.
no functional change.
 1.9 01-Jul-2011  dyoung branches: 1.9.52;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.8 07-Nov-2009  cegger Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
 1.7 24-Nov-2005  yamt branches: 1.7.80;
bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
 1.6 13-Apr-2005  yamt branches: 1.6.2; 1.6.8;
s3c2xx0_bs_unmap: overlooked yamt-km API update.
from Havard Eidnes, tweaked by me.
 1.5 01-Apr-2005  yamt merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
 1.4 16-Mar-2005  bsh Switch SMDK2410 and SMDK2800 kernels to use pmap_devmap_bootstrap() to map
I/O registers that are used in early start-up stage. This replaces the
special bootstrap-time-only bus_space_map function in smdk{2410,2800}_machdep.c.

This makes SMDK{2410,2800}'s initarm() a bit simpler, and gives us smaller diffs
to other evbarm platforms.

An another good thing for SMDK2800 is that now we have all built-in peripheral
registers mapped in 2 segments. We may expect less TLB miss on I/O access
(very slightly).
 1.3 03-Sep-2003  mycroft branches: 1.3.8; 1.3.10;
Use generic versions of rr_1, wr_1, sr_1 -- some PCMCIA cards use these.
 1.2 15-Jul-2003  lukem __KERNEL_RCSID()
 1.1 20-Nov-2002  bsh branches: 1.1.2; 1.1.8;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.8.6 11-Dec-2005  christos Sync with head.
 1.1.8.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.8.4 01-Apr-2005  skrll Sync with HEAD.
 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 20-Nov-2002  thorpej file s3c2xx0_space.c was added on branch nathanw_sa on 2002-12-11 05:53:17 +0000
 1.3.10.2 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.3.10.1 28-Jan-2005  yamt convert arch/arm to new apis.
 1.3.8.1 29-Apr-2005  kent sync with -current
 1.6.8.1 29-Nov-2005  yamt sync with head.
 1.6.2.1 21-Jun-2006  yamt sync with head.
 1.7.80.1 11-Mar-2010  yamt sync with head
 1.9.52.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.7 17-Mar-2014  skrll iTypo in comment.
 1.6 21-Feb-2010  bsh branches: 1.6.10; 1.6.20; 1.6.24;
Modify definitions for ULCOM register of UART according to S3C2800
User's manual rev 1.3.

The values of ULCON_PARITY_SHIFT and ULCON_IR are now same to those
for S3C2410. So the definitions are moved to s3c2xx0reg.h. (Old
definitions from User's manual rev1.1 were differ to those for
S3C2410, and that was why I put them in s3c2800reg.h and s3c24x0reg.h.
There's no description in errata about this changes.)

Also, fix the value for UMSTAT_DCTS on 2800.

The values of UMCON_AFC and UMSTAT_DCTS still differ between 2800 and
2410.

Reported by Brett Slager. Thank you very much.
 1.5 11-Dec-2005  christos branches: 1.5.80; 1.5.100;
merge ktrace-lwp.
 1.4 12-Feb-2004  bsh be consistent with #define<TAB>
 1.3 04-Aug-2003  bsh Samsung's S3C2800 and S3C24[10]0 CPUs have same built-in UART block,
but there are very small diffs in register definitions. For that, add
new options SSCOM_S3C{2800,2410,2400} and include appropriate
s3c*reg.h.

SSCOM_S3C2410 is also needed for interrupt controller differences.
 1.2 02-Feb-2003  bsh branches: 1.2.2;
Fix UFCON RX trigger level definitions.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file s3c2xx0reg.h was added on branch nathanw_sa on 2002-12-11 05:53:18 +0000
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.5.100.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.5.80.1 11-Mar-2010  yamt sync with head
 1.6.24.1 18-May-2014  rmind sync with head
 1.6.20.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.10.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.7 30-Jan-2012  nisimura Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.6 01-Jul-2011  dyoung branches: 1.6.2; 1.6.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.5 16-Nov-2010  bsh make SMDK2410 kernel compile again after changes to sys/param.h
 1.4 11-Dec-2005  christos branches: 1.4.102;
merge ktrace-lwp.
 1.3 05-Aug-2003  bsh add busdma tag to s3c2xx0_softc and attach arg.

initialize busdma tag in s3c2410_attach()
 1.2 13-May-2003  bsh branches: 1.2.2;
add fields to hold FCLK, HCLK, and PCLK frequency.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file s3c2xx0var.h was added on branch nathanw_sa on 2002-12-11 05:53:18 +0000
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.102.1 05-Mar-2011  rmind sync with head
 1.6.6.1 18-Feb-2012  mrg merge to -current.
 1.6.2.1 17-Apr-2012  yamt sync with head
 1.50 26-Oct-2022  riastradh ddb/db_active.h: New home for extern db_active.

This can be included unconditionally, and db_active can then be
queried unconditionally; if DDB is not in the kernel, then db_active
is a constant zero. Reduces need for #include opt_ddb.h, #ifdef DDB.
 1.49 20-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.48 10-Nov-2019  chs branches: 1.48.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.47 13-Apr-2015  riastradh branches: 1.47.18;
MD rnd.h cleanups. Please let me know if I broke anything!
 1.46 10-Aug-2014  tls branches: 1.46.4;
Merge tls-earlyentropy branch into HEAD.
 1.45 25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.44 16-Mar-2014  reinoud branches: 1.44.2;
Remove unneeded dependencies
 1.43 16-Mar-2014  reinoud Exclude sscom_init() prototype definition when its not declared later
 1.42 16-Mar-2014  dholland Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.41 14-Mar-2014  matt Cleanup sscom to make more SoC invariant
 1.40 10-Mar-2014  htodd Delete unused variables for new gcc.
 1.39 01-May-2013  mlelstv branches: 1.39.4;
For a polled console incoming characters are buffered on output.
The buffer is never passed to the regular tty routines and can
survive from early boot to halt where it is read by the "press
any continue to reboot" loops.
As a workaround, just kill the read-ahead buffer when switching
from and to polled mode.
 1.38 27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.37 07-Feb-2012  nisimura branches: 1.37.6;

- add MBR editing menu to sysinst.
- fix typos in timecounter names.
- make sure to drain Tx FIFO to avoid clobbering
kernel boot messages.
- allow to have the 3rd UART.
- add missing time-of-day clock support.

Ok by releng.
 1.36 04-Feb-2012  christos fix the build
 1.35 02-Feb-2012  tls Entropy-pool implementation move and cleanup.

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

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

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

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

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

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.34 30-Jan-2012  nisimura Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.33 24-Apr-2011  rmind branches: 1.33.4; 1.33.8;
Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency. Remove some unnecessary malloc.h inclusions as well.
 1.32 09-Dec-2009  he branches: 1.32.4; 1.32.6;
Make this one build again.
 1.31 06-Dec-2009  dyoung Simplify the device-activation hook. Move some of the device
deactivation to the detachment routine, where it belongs.
 1.30 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.29 11-Jun-2008  cegger use device_lookup_private to get softc
 1.28 28-Apr-2008  martin branches: 1.28.2; 1.28.4;
Remove clause 3 and 4 from TNF licenses
 1.27 27-Nov-2007  ad branches: 1.27.14; 1.27.16; 1.27.18;
Use the softint API.
 1.26 19-Nov-2007  ad - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.25 17-Oct-2007  garbled branches: 1.25.2;
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.24 14-Jul-2007  ad branches: 1.24.6; 1.24.8; 1.24.10; 1.24.12; 1.24.16;
Generic soft interrupts are mandatory.
 1.23 11-Jul-2007  he Adapt to new signature for callout_init().
 1.22 04-Mar-2007  christos branches: 1.22.2; 1.22.10;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.21 01-Oct-2006  elad branches: 1.21.4;
More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.20 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks!
 1.19 23-Jul-2006  ad branches: 1.19.4; 1.19.6;
Use the LWP cached credentials where sane.
 1.18 14-May-2006  elad integrate kauth.
 1.17 26-Mar-2006  thorpej Use device_unit().
 1.16 20-Feb-2006  thorpej branches: 1.16.2; 1.16.4; 1.16.6;
Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
 1.15 24-Dec-2005  perry branches: 1.15.2; 1.15.4; 1.15.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.14 11-Dec-2005  christos merge ktrace-lwp.
 1.13 06-Sep-2005  kleink Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
 1.12 04-Jun-2005  he branches: 1.12.2;
Add some const and rename a local variable to avoid shadowing.
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.10 04-Aug-2003  bsh Samsung's S3C2800 and S3C24[10]0 CPUs have same built-in UART block,
but there are very small diffs in register definitions. For that, add
new options SSCOM_S3C{2800,2410,2400} and include appropriate
s3c*reg.h.

SSCOM_S3C2410 is also needed for interrupt controller differences.
 1.9 31-Jul-2003  bsh split sscomintr() to sscomtxintr() and sscomrxintr().
 1.8 15-Jul-2003  lukem __KERNEL_RCSID()
 1.7 29-Jun-2003  fvdl branches: 1.7.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.6 29-Jun-2003  ichiro struct proc * -> struct lwp *
 1.5 23-Jun-2003  martin Make sure to include opt_foo.h if a defflag option FOO is used.
 1.4 13-May-2003  bsh + fix a bug to think FIFO full as FIFO empty.

+ on rx buffer overflow case, disable error interrupt as wel as rx
interrupt.

+ FIFO is always enabled.
 1.3 13-May-2003  bsh white space nit.
 1.2 08-Mar-2003  he Initialize the two new members of "struct consdev" to NULL, so that
this file compiles again.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file sscom.c was added on branch nathanw_sa on 2002-12-11 05:53:19 +0000
 1.7.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.2.4 17-Jan-2005  skrll Adapt to branch.
 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.12.2.4 07-Dec-2007  yamt sync with head
 1.12.2.3 03-Sep-2007  yamt sync with head.
 1.12.2.2 30-Dec-2006  yamt sync with head.
 1.12.2.1 21-Jun-2006  yamt sync with head.
 1.15.6.2 01-Jun-2006  kardel Sync with head.
 1.15.6.1 22-Apr-2006  simonb Sync with head.
 1.15.4.1 09-Sep-2006  rpaulo sync with head
 1.15.2.1 01-Mar-2006  yamt sync with head.
 1.16.6.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.16.6.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.16.4.4 13-May-2006  elad sprinkle some #include <sys/kauth.h> in files that use kauth kpi but
don't include it yet. hopefully this will prevent some fallout.
 1.16.4.3 19-Apr-2006  elad sync with head - hopefully this will work
 1.16.4.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.16.4.1 08-Mar-2006  elad Adapt to kernel authorization KPI.

I expect *some* lossage here...
 1.16.2.3 11-Aug-2006  yamt sync with head
 1.16.2.2 24-May-2006  yamt sync with head.
 1.16.2.1 01-Apr-2006  yamt sync with head.
 1.19.6.1 22-Oct-2006  yamt sync with head
 1.19.4.1 18-Nov-2006  ad Sync with head.
 1.21.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.22.10.1 03-Oct-2007  garbled Sync with HEAD
 1.22.2.2 03-Dec-2007  ad Sync with HEAD.
 1.22.2.1 15-Jul-2007  ad Sync with head.
 1.24.16.1 21-Nov-2007  bouyer Sync with HEAD
 1.24.12.2 09-Jan-2008  matt sync with HEAD
 1.24.12.1 06-Nov-2007  matt sync with HEAD
 1.24.10.1 01-Jan-2008  chris Sync with HEAD.
 1.24.8.2 03-Dec-2007  joerg Sync with HEAD.
 1.24.8.1 21-Nov-2007  joerg Sync with HEAD.
 1.24.6.1 26-Dec-2007  rjs Sync with HEAD.
 1.25.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.27.18.3 11-Mar-2010  yamt sync with head
 1.27.18.2 04-May-2009  yamt sync with head.
 1.27.18.1 16-May-2008  yamt sync with head.
 1.27.16.2 17-Jun-2008  yamt sync with head.
 1.27.16.1 18-May-2008  yamt sync with head.
 1.27.14.2 29-Jun-2008  mjf Sync with HEAD.
 1.27.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.28.4.1 18-Jun-2008  simonb Sync with head.
 1.28.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.32.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.32.4.1 31-May-2011  rmind sync with head
 1.33.8.1 18-Feb-2012  mrg merge to -current.
 1.33.4.3 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.33.4.2 30-Oct-2012  yamt sync with head
 1.33.4.1 17-Apr-2012  yamt sync with head
 1.37.6.4 03-Dec-2017  jdolecek update from HEAD
 1.37.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.37.6.2 23-Jun-2013  tls resync from head
 1.37.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.39.4.1 18-May-2014  rmind sync with head
 1.44.2.2 10-Aug-2014  tls Rebase.
 1.44.2.1 07-Apr-2014  tls Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
that had stubbed out code, other minor cleanups.
 1.46.4.1 06-Jun-2015  skrll Sync with HEAD
 1.47.18.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.48.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.8 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.7 14-Mar-2014  matt Cleanup sscom to make more SoC invariant
 1.6 27-Oct-2012  chs branches: 1.6.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.5 30-Jan-2012  nisimura branches: 1.5.6;

Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.4 01-Jul-2011  dyoung branches: 1.4.2; 1.4.6;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.3 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.2 11-Dec-2005  christos branches: 1.2.80;
merge ktrace-lwp.
 1.1 31-Jul-2003  bsh branches: 1.1.4;
the first cut of Samsung S3C2410 support.
It is Samsung's another ARM920 based SoC.

XXX: not tested much yet.
 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 31-Jul-2003  skrll file sscom_s3c2410.c was added on branch ktrace-lwp on 2004-08-03 10:32:50 +0000
 1.2.80.1 11-Mar-2010  yamt sync with head
 1.4.6.1 18-Feb-2012  mrg merge to -current.
 1.4.2.3 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.4.2.2 30-Oct-2012  yamt sync with head
 1.4.2.1 17-Apr-2012  yamt sync with head
 1.5.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.2.1 18-May-2014  rmind sync with head
 1.4 14-Mar-2014  matt Cleanup sscom to make more SoC invariant
 1.3 27-Oct-2012  chs branches: 1.3.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.2 07-Feb-2012  nisimura branches: 1.2.4; 1.2.6; 1.2.10;

- add MBR editing menu to sysinst.
- fix typos in timecounter names.
- make sure to drain Tx FIFO to avoid clobbering
kernel boot messages.
- allow to have the 3rd UART.
- add missing time-of-day clock support.

Ok by releng.
 1.1 30-Jan-2012  nisimura Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.2.6.4 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.3 30-Oct-2012  yamt sync with head
 1.2.6.2 17-Apr-2012  yamt sync with head
 1.2.6.1 07-Feb-2012  yamt file sscom_s3c2440.c was added on branch yamt-pagecache on 2012-04-17 00:06:07 +0000
 1.2.4.2 18-Feb-2012  mrg merge to -current.
 1.2.4.1 07-Feb-2012  mrg file sscom_s3c2440.c was added on branch jmcneill-usbmp on 2012-02-18 07:31:32 +0000
 1.3.2.1 18-May-2014  rmind sync with head
 1.11 27-Sep-2022  skrll Remove unnecessary sys/malloc.h include
 1.10 14-Mar-2014  matt Cleanup sscom to make more SoC invariant
 1.9 27-Oct-2012  chs branches: 1.9.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.8 01-Jul-2011  dyoung branches: 1.8.2; 1.8.12;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.7 21-Nov-2009  rmind Use lwp_getpcb() on ARM (and acorn26/32), clean from struct user usage.
 1.6 11-Dec-2005  christos branches: 1.6.80;
merge ktrace-lwp.
 1.5 31-Jul-2003  bsh split sscomintr() to sscomtxintr() and sscomrxintr().
 1.4 15-Jul-2003  lukem __KERNEL_RCSID()
 1.3 13-May-2003  bsh branches: 1.3.2;
use system's real PCLK frequency instead of a compile time constant for
baudrate divisor setup.
 1.2 12-May-2003  bsh add an arg to s3c2800_intr_establish() for interrupt type.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file sscom_s3c2800.c was added on branch nathanw_sa on 2002-12-11 05:53:19 +0000
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.80.1 11-Mar-2010  yamt sync with head
 1.8.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.8.2.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.8.2.1 30-Oct-2012  yamt sync with head
 1.9.2.1 18-May-2014  rmind sync with head
 1.14 14-Apr-2015  riastradh Include <sys/rndsource.h> where it is actually used.

I had removed <sys/rnd.h> from files that didn't mention anything of
the rnd(9) API. But they included other files which assumed
<sys/rnd.h> had already been included.
 1.13 14-Mar-2014  matt branches: 1.13.6;
Cleanup sscom to make more SoC invariant
 1.12 27-Oct-2012  chs branches: 1.12.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.11 02-Feb-2012  tls branches: 1.11.6;
Entropy-pool implementation move and cleanup.

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

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

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

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

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

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.10 30-Jan-2012  nisimura Add FriendlyARM Mini2440 support.
- new code for Samsung S3C2440 SoC.
- update for other S3C2xx0.
This port was done by Paul Fleischer.
 1.9 19-Nov-2011  tls branches: 1.9.2;
First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>. This change includes
the following:

An initial cleanup and minor reorganization of the entropy pool
code in sys/dev/rnd.c and sys/dev/rndpool.c. Several bugs are
fixed. Some effort is made to accumulate entropy more quickly at
boot time.

A generic interface, "rndsink", is added, for stream generators to
request that they be re-keyed with good quality entropy from the pool
as soon as it is available.

The arc4random()/arc4randbytes() implementation in libkern is
adjusted to use the rndsink interface for rekeying, which helps
address the problem of low-quality keys at boot time.

An implementation of the FIPS 140-2 statistical tests for random
number generator quality is provided (libkern/rngtest.c). This
is based on Greg Rose's implementation from Qualcomm.

A new random stream generator, nist_ctr_drbg, is provided. It is
based on an implementation of the NIST SP800-90 CTR_DRBG by
Henric Jungheim. This generator users AES in a modified counter
mode to generate a backtracking-resistant random stream.

An abstraction layer, "cprng", is provided for in-kernel consumers
of randomness. The arc4random/arc4randbytes API is deprecated for
in-kernel use. It is replaced by "cprng_strong". The current
cprng_fast implementation wraps the existing arc4random
implementation. The current cprng_strong implementation wraps the
new CTR_DRBG implementation. Both interfaces are rekeyed from
the entropy pool automatically at intervals justifiable from best
current cryptographic practice.

In some quick tests, cprng_fast() is about the same speed as
the old arc4randbytes(), and cprng_strong() is about 20% faster
than rnd_extract_data(). Performance is expected to improve.

The AES code in src/crypto/rijndael is no longer an optional
kernel component, as it is required by cprng_strong, which is
not an optional kernel component.

The entropy pool output is subjected to the rngtest tests at
startup time; if it fails, the system will reboot. There is
approximately a 3/10000 chance of a false positive from these
tests. Entropy pool _input_ from hardware random numbers is
subjected to the rngtest tests at attach time, as well as the
FIPS continuous-output test, to detect bad or stuck hardware
RNGs; if any are detected, they are detached, but the system
continues to run.

A problem with rndctl(8) is fixed -- datastructures with
pointers in arrays are no longer passed to userspace (this
was not a security problem, but rather a major issue for
compat32). A new kernel will require a new rndctl.

The sysctl kern.arandom() and kern.urandom() nodes are hooked
up to the new generators, but the /dev/*random pseudodevices
are not, yet.

Manual pages for the new kernel interfaces are forthcoming.
 1.8 01-Jul-2011  dyoung branches: 1.8.2;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.7 06-Mar-2006  rjs Remove SET/CLR/ISSET macros.
 1.6 11-Dec-2005  christos branches: 1.6.4; 1.6.6; 1.6.8;
merge ktrace-lwp.
 1.5 04-Aug-2003  bsh branches: 1.5.16;
Samsung's S3C2800 and S3C24[10]0 CPUs have same built-in UART block,
but there are very small diffs in register definitions. For that, add
new options SSCOM_S3C{2800,2410,2400} and include appropriate
s3c*reg.h.

SSCOM_S3C2410 is also needed for interrupt controller differences.
 1.4 31-Jul-2003  bsh split sscomintr() to sscomtxintr() and sscomrxintr().
 1.3 23-Jun-2003  martin branches: 1.3.2;
Make sure to include opt_foo.h if a defflag option FOO is used.
 1.2 13-May-2003  bsh + fix a bug to think FIFO full as FIFO empty.

+ on rx buffer overflow case, disable error interrupt as wel as rx
interrupt.

+ FIFO is always enabled.
 1.1 20-Nov-2002  bsh branches: 1.1.2;
Samsung S3C2800 is a CPU with ARM920T core.
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 20-Nov-2002  thorpej file sscom_var.h was added on branch nathanw_sa on 2002-12-11 05:53:20 +0000
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.5.16.1 21-Jun-2006  yamt sync with head.
 1.6.8.1 13-Mar-2006  yamt sync with head.
 1.6.6.1 22-Apr-2006  simonb Sync with head.
 1.6.4.1 09-Sep-2006  rpaulo sync with head
 1.8.2.3 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.8.2.2 30-Oct-2012  yamt sync with head
 1.8.2.1 17-Apr-2012  yamt sync with head
 1.9.2.1 18-Feb-2012  mrg merge to -current.
 1.11.6.3 03-Dec-2017  jdolecek update from HEAD
 1.11.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.6.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.12.2.1 18-May-2014  rmind sync with head
 1.13.6.1 06-Jun-2015  skrll Sync with HEAD

RSS XML Feed